[Interest] Application build times using Qt4 vs Qt5

Adam Light aclight at gmail.com
Tue Jul 29 20:22:52 CEST 2014


I've noticed that compiling my application takes considerably longer when
compiling using Qt5 vs. Qt 4. This is true on Macintosh 10.9 and Windows 7.
I'm comparing builds done using the same machine with the same application
source code.

For example,
Macintosh:
Qt 4.8.6: Elapsed time: 06:20
Qt 5.4-dev: Elapsed time: 08:51.

Windows:
Qt 4.8.6: Elapsed time: 04:51.
Qt 5.4-dev: Elapsed time: 10:23.

I've pasted the exact build steps that are executed in these cases at the
end of this message. These are times for a full rebuild after having
deleted the build directory and build product from before.

The Qt builds we're using are self built. I've also pasted the configure
command we use to build our Qt libraries at the end.

There are a few places in our code where we use something like:

#if QT_VERSION >= 0x050000

	...

#else

	...

#endif

to compile different code depending on the Qt version, but these are all
minor differences. We are not yet using any Qt5 only features so I wouldn't
expect the small differences in our code to have much impact on compile
time.

Do others see similar increases of build time with Qt5 vs. Qt4, especially
on Windows? Does anyone have any suggestions to improve the build
performance when we build with Qt5?

Just to be clear, I'm not complaining of how long it takes to build the Qt
libraries, just how long it takes to build *our application* with different
versions of the Qt libraries.

Thanks
Adam


Here is the full information on the builds:
Using Creator 3.2.0-rc1 on Mac 10.9.4 (64-bit Debug builds):
Qt 4.8.6: Elapsed time: 06:20.
Build Steps:
qmake: qmake IgorPhoenix.pro -r -spec unsupported/macx-clang CONFIG+=x86_64
Make: make -r -w -j 16 in
/Users/aclight/Documents/IgorDev/IgorGit/IgorPhoenix-Qt4-64bit--build-debug
 Clean steps:
Make: make -r -w clean in
/Users/aclight/Documents/IgorDev/IgorGit/IgorPhoenix-Qt4-64bit--build-debug
 Qt 5.4-dev: Elapsed time: 08:51.
Build Steps:
qmake: qmake IgorPhoenix.pro -r -spec macx-clang CONFIG+=x86_64
Make: make -r -w -j 16 in
/Users/aclight/Documents/IgorDev/IgorGit/build-IgorPhoenix-Latest_Qt5_from_SVN_64_bit-Debug_Qt5_Debug
 Clean steps:
Make: make -j 16 -r -w clean in
/Users/aclight/Documents/IgorDev/IgorGit/build-IgorPhoenix-Latest_Qt5_from_SVN_64_bit-Debug_Qt5_Debug
Using Creator 3.2.0-rc1 on Windows 7 (64-bit Debug builds, using jom.exe
for make step):
Qt 4.8.6: Elapsed time: 04:51.
Build Steps:
qmake: qmake.exe IgorPhoenix.pro -r -spec
C:\qtbuild\qt\mkspecs\win32-msvc2013 DEFINES+=WINDOWS_USE_BASH
Make: jom.exe in
C:\IgorDev\IgorGit\build-IgorPhoenix-Qt4_from_SVN_64_bit-Debug
 Clean steps:
Make: jom.exe clean in
C:\IgorDev\IgorGit\build-IgorPhoenix-Qt4_from_SVN_64_bit-Debug
 Qt 5.4-dev: Elapsed time: 10:23.
Build Steps:
qmake: qmake.exe IgorPhoenix.pro -r -spec win32-msvc2013
DEFINES+=WINDOWS_USE_BASH
Make: jom.exe in
C:\IgorDev\IgorGit\build-IgorPhoenix-Qt5_from_SVN_64_bit-Debug
 Clean Steps:
Make: jom.exe clean in
C:\IgorDev\IgorGit\build-IgorPhoenix-Qt5_from_SVN_64_bit-Debug


To build our copies of the Qt libraries, we use the following configure
commands:

Macintosh:
Qt4: echo yes | MAKEFLAGS=-j16
QMAKESPEC=/qtbuild/qt/mkspecs/unsupported/macx-clang ../../qt/configure
-debug-and-release -opensource -no-qt3support -nomake examples -nomake
demos -nomake tests -silent -no-sql-mysql -no-webkit -cocoa -arch x86_64
-arch x86 -no-phonon -no-phonon-backend -prefix /qtbuild/install/macosx

Qt5: MAKEFLAGS=-j16 ../../qt/configure -confirm-license -debug-and-release
-opensource -gui -widgets -qpa cocoa -no-qml-debug -nomake examples -nomake
tests -silent -no-sql-mysql -platform macx-clang -no-c++11 -prefix
/qtbuild5/install/mac64

Windows:
Qt4: echo yes | c:\qtbuild\qt\configure.exe -debug-and-release -opensource
-no-qt3support -nomake examples -nomake demos -nomake tests -no-dsp
-no-webkit -mp -prefix C:\qtbuild\install\win64

Qt5: c:\qtbuild5\qt\configure -confirm-license -make-tool jom
-debug-and-release -opensource -gui -widgets -no-qml-debug -nomake examples
-nomake tests -no-sql-mysql -opengl desktop -mp -prefix
C:\qtbuild5\install\win64
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140729/86727549/attachment.html>


More information about the Interest mailing list