Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] Qt5 qmake performance issue - 8 times slower than Qt4 qmake
we ported a large Qt project from Qt4 to Qt5 and noticed, that Qt5 qmake is ca. 8 times slower that Qt4 qmake.
The attached QtCreator output shows the two qmake runs for the same project. The Qt4 qmake run needs 26 seconds but the Qt5 qmake needs 3 minutes and 18 seconds. That is ca. 8 times slower.
The Qt5 qmake is the qmake.exe that ships with the Qt 5.0.2 MinGW installation. The Qt4 qmake has been build with the exact same compiler - so this is not related to compiler. So is this a kind of performance issue or is Qt5 qmake more sophisitcated and needs more time because it checks and does more things? If no one knows a good reason, I would file a bug report in Qt bugtracker.
@Qt4 qmake run
07:49:47: Führe Schritte für Projekt qtlabb aus...
07:49:47: Starte "c:\codingxp\qt\qt\bin\qmake.exe" C:\CodingXP\cetoni_repository\usl\env\qt\qtlabb\qtlabb.pro -r -spec win32-g++ "CONFIG+=declarative_debug"
Reading C:/CodingXP/cetoni_repository/usl/env/qt/qtlabb/common/common.pro [C:/CodingXP/cetoni_projects/build-qtlabb-Desktop_Qt_4_8_4-Debug/common]
Reading C:/CodingXP/cetoni_repository/usl/env/qt/qtlabb/3rdparty/3rdparty.pro [C:/CodingXP/cetoni_projects/build-qtlabb-Desktop_Qt_4_8_4-Debug/3rdparty]
07:50:13: Der Prozess "c:\codingxp\qt\qt\bin\qmake.exe" wurde normal beendet.
07:50:13: Verstrichene Zeit: 00:26.
Qt5 qmake run
07:52:00: Führe Schritte für Projekt qtlabb aus...
07:52:00: Starte "C:\CodingXP\Qt5.0.2\5.0.2\mingw47_32\bin\qmake.exe" C:\CodingXP\cetoni_repository\usl\env\qt\qtlabb\qtlabb.pro -r -spec win32-g++ "CONFIG+=debug" "CONFIG+=declarative_debug" "CONFIG+=qml_debug"
Reading C:/CodingXP/cetoni_repository/usl/env/qt/qtlabb/common/common.pro [C:/CodingXP/cetoni_projects/build-qtlabb-Desktop_Qt_5_0_2_mingw47_32-Debug/common]
Reading C:/CodingXP/cetoni_repository/usl/env/qt/qtlabb/3rdparty/3rdparty.pro [C:/CodingXP/cetoni_projects/build-qtlabb-Desktop_Qt_5_0_2_mingw47_32-Debug/3rdparty]
Reading C:/CodingXP/cetoni_repository/usl/env/qt/qtlabb/widgets/widgets.pro [C:/CodingXP/cetoni_projects/build-qtlabb-Desktop_Qt_5_0_2_mingw47_32-Debug/widgets]
Reading C:/CodingXP/cetoni_repository/usl/env/qt/qtlabb/itemviews/itemviews.pro [C:/CodingXP/cetoni_projects/build-qtlabb-Desktop_Qt_5_0_2_mingw47_32-Debug/itemviews]
Reading C:/CodingXP/cetoni_repository/usl/env/qt/qtlabb/hid/hid.pro [C:/CodingXP/cetoni_projects/build-qtlabb-Desktop_Qt_5_0_2_mingw47_32-Debug/hid]
07:55:18: Der Prozess "C:\CodingXP\Qt5.0.2\5.0.2\mingw47_32\bin\qmake.exe" wurde normal beendet.
07:55:18: Verstrichene Zeit: 03:18.@
Seems like a good candidate for a bug report. You can also ping Qt devs on development ML or IRC.
luxner last edited by
I'm facing the same problem here. qmake4 runs very fast. qmake5 takes much, much longer.
Have you found a solution for that issue?
no, I have not found a solution yet. Now that I know that I'm not the only one with this problem, I created a bug report:
Please vote for this bug and add a comment that you have the same problem. Can you tell me something about your system and virus scanner? My system:
Windows 7 64 Bit
Qt5.2.1 with MinGW
Virus scanner: AVG AntiVirus Business Edition
According to the solution provided in this "bug report":https://bugreports.qt-project.org/browse/QTBUG-37252 adding CONFIG-=depend_includepath to the project will decrease processing time.
Here are the measurements I did for qmake invocation:
So qmake5 is only 2 times slower than qmake4 and not 8-10 times slower.
luxner last edited by
in the meanwhile I also found out that calling qmake with the "-nodepend" option decreases processing time. I think that's the same option as you mention.
Without this option qmake opens all the header files and scans those files for their includes, so it basically opens all the header files which are involved in the project (that also means thirdparty includes). That was the reason for the slow performance.
It seems that in qmake4 "-nodepend" was the default!?