Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Significantly (23 to 33%) faster builds of qgis_core/analysis/3d/gui/app
by precompiling qgis.h Needs to be precompiled for each target due to different includes, defines, etc. (~ 4 second for each target to build the precompiled header in below timings) Executive summary: - ~ 33% faster builds on ubuntu 22.04, QT5 - ~ 23% faster builds (only measured on qgis_core) on fedora:rawhide, QT6 - build artifact increase size: + ~7% - shared library increase size: + 1% at most Setup: laptop with Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz, host OS Ubuntu 20.04, QGIS built in Docker Details: * ubuntu 22.04, QT5, regular, CMAKE_BUILD_TYPE=Debug ```bash $ time make -j12 qgis_core real 9m8.566s user 90m24.917s sys 9m51.179s $ du -c src/core | tail -n 1 1994796 total $ ll ./output/lib/libqgis_core.so.3.41.0 -rwxr-xr-x 1 root root 590223936 Nov 30 00:35 ./output/lib/libqgis_core.so.3.41.0* ``` ```bash $ time make -j12 qgis_gui real 8m26.430s user 80m28.457s sys 11m27.936s $ du -c src/gui | tail -n 1 1538440 total $ ll ./output/lib/libqgis_gui.so.3.41.0 -rwxr-xr-x 1 root root 454560448 Nov 30 00:47 ./output/lib/libqgis_gui.so.3.41.0* ``` ```bash $ time make -j12 qgis_app real 4m55.189s user 47m4.876s sys 6m54.868s $ du -c src/app | tail -n 1 783256 total $ ll ./output/lib/libqgis_app.so.3.41.0 -rwxr-xr-x 1 root root 232041152 Nov 30 01:25 ./output/lib/libqgis_app.so.3.41.0* ``` * ubuntu 22.04, QT5, qgis.h as precompiled header, CMAKE_BUILD_TYPE=Debug: ```bash $ time make -j12 qgis_core real 6m3.472s user 59m3.835s sys 5m22.424s $ du -c src/core | tail -n 1 2137448 total $ ll ./output/lib/libqgis_core.so.3.41.0 -rwxr-xr-x 1 root root 598395456 Nov 30 00:56 ./output/lib/libqgis_core.so.3.41.0* ``` ```bash $ time make -j12 qgis_gui real 5m45.719s user 53m30.107s sys 6m11.246s $ du -c src/gui | tail -n 1 1660444 total $ ll ./output/lib/libqgis_gui.so.3.41.0 -rwxr-xr-x 1 root root 456432320 Nov 30 01:04 ./output/lib/libqgis_gui.so.3.41.0* ``` ```bash $ time make -j12 qgis_analysis real 2m36.504s user 26m25.310s sys 2m17.601s $ du -c src/analysis/ | tail -n 1 920912 total $ ll ./output/lib/libqgis_analysis.so.3.41.0 -rwxr-xr-x 1 root root 228178496 Nov 30 01:11 ./output/lib/libqgis_analysis.so.3.41.0* ``` ```bash $ time make -j12 qgis_3d real 0m43.710s user 6m9.148s sys 0m39.859s $ du -c src/3d | tail -n 1 315212 total $ ll ./output/lib/libqgis_3d.so.3.41.0 -rwxr-xr-x 1 root root 58472960 Nov 30 01:14 ./output/lib/libqgis_3d.so.3.41.0* ``` ```bash $ time make -j12 qgis_app real 3m35.156s user 34m17.371s sys 3m52.111s $ du -c src/app | tail -n 1 905160 total $ ll ./output/lib/libqgis_app.so.3.41.0 -rwxr-xr-x 1 root root 232577728 Nov 30 01:19 ./output/lib/libqgis_app.so.3.41.0* ``` * fedora:rawhide, QT6, regular, CMAKE_BUILD_TYPE=Debug: ```bash $ time ninja qgis_core real 13m47.521s user 134m48.546s sys 10m2.176s $ du -c src/core | tail -n 1 2862200 total $ ll ./output/lib/libqgis_core.so.3.41.0 -rwxr-xr-x 1 root root 824605072 Nov 30 00:53 ./output/lib/libqgis_core.so.3.41.0 ``` * fedora:rawhide, QT6, qgis.h as precompiled header, CMAKE_BUILD_TYPE=Debug: ```bash $ time ninja qgis_core real 10m35.657s user 97m51.161s sys 7m59.564s $ du -c src/core | tail -n 1 3028420 total $ ll ./output/lib/libqgis_core.so.3.41.0 -rwxr-xr-x 1 root root 825732184 Nov 30 00:38 ./output/lib/libqgis_core.so.3.41.0 ```
- Loading branch information