I am a Qt developer. I have a very fast Ryzen 3900X and I'm looking for tips to speed up my daily work (faster builds in linux)
This is a sample project:
- full rebuild 24 cores: Elapsed time: 00:38.
- modify main.cpp: Elapsed time: 00:02.
- modify main.qml: Elapsed time: 00:05.
Now I am using these options which noticeably increase compilation speed (in project .pro):
unix{
CONFIG+= use_gold_linker # betterlink speed
QMAKE_CXX = ccache $$QMAKE_CXX # use ccache. apt install ccache
QMAKE_CC = ccache $$QMAKE_CC # use ccache
}
CONFIG+=qtquickcompiler # compile QML always (debug&release) (Qt>=5.11).QML debugging may not work
(You can use CONFIG+=qtquickcompiler or build always in release.)
And I get:
- full rebuild 24 cores: Elapsed time: 00:05.
- modify main.cpp: Elapsed time: 00:01.
- modify main.qml: Elapsed time: 00:01.
Now it's really very fast, and I can modify a QML file, build and execute in just 1 second.
More ideas to increase compilation speed?
any ideas for better compilation times in windows + VS2019? Qmake build system seems very slow in win32
any ideas for macos? (I haven't tried ccache and gold linker on mac os)