Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
1.14.1
-
fb52fed84 (master) ae82e039eb74b092604910a1f3f7fa4887397cbc
Description
Building projects with a statically built Qt resolve very slowly. More specifically, Qbs spends a lot of time resolving the build before commencing actual build if for example a `.qbs` file has been touched.
Steps to reproduce:
- Extract attached example project
- Point the profile in `slow.qbs` to a statically built Qt qmake.
- Build once `qbs build profile:static-qt`
- Time a zero-build: `time qbs build profile:static-qt`
- Touch the `.qbs` file to trigger project resolving: `touch slow.qbs`
- Time again: `time qbs build profile:static-qt`
Example output:
➜ slow-static-qbs qbs --version 1.14.1 ➜ slow-static-qbs qbs build profile:static-qt ... (output omitted ... ➜ slow-static-qbs time qbs build profile:static-qt Restoring build graph from disk Building for configuration default Build done for configuration default. /srv/build-deps/toolchains/QtCreator/QtCreator-4.10.2/Tools/QtCreator/bin/qbs 0,09s user 0,02s system 94% cpu 0,109 total ➜ slow-static-qbs touch slow.qbs ➜ slow-static-qbs time qbs build profile:static-qt Restoring build graph from disk Resolving project for configuration default Building for configuration default Build done for configuration default. qbs 40,63s user 0,55s system 99% cpu 41,213 total
As shown above, after simply touching the qbs file the build go from taking 0.02s to over 40s for a relatively simple project. With a dynamically linked Qt the same project will build in less than 2 seconds in both cases.