Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
6.3.0 RC
-
None
-
macOS 11.6, Qt Creator, Qt 6.3.0 iOS
Description
The qmake build is very slow in large projects with the iOS kit.
It is because the qmlimportscanner is run (twice) over the whole project folder on every qmake via qt.prf.
For projects with many folders, resources etc, this can take minutes. It also seems qmlimportscanner is slower than it was with Qt 5.
A workaround / fix would be to allow providing the directory to scan for QML files.
E.g. changing qt.prf line 323 from
JSON = $$system($$QMLIMPORTSCANNER $$system_quote($$_PRO_FILE_PWD_) $$IMPORTPATHS)
to
JSON = $$system($$QMLIMPORTSCANNER $$system_quote($$QML_ROOT_PATH) $$IMPORTPATHS)
and then set QML_ROOT_PATH in the .pro file to e.g. $$PWD/qml. So additional resource/source folders are not scanned every qmake build.
In a large project of ours with ~30k files of ~4GB, qmake (thus also the "Reading project" step in Qt Creator) takes 5+ minutes without this fix.
To test, you can also create a folder in your project directly, and create a bunch of files in it, e.g.
for i in $(seq 1 20000); do echo "Item { property string name: '$i'; property string data: '$(seq -s , 1 $i)' }" > $i.qml; done
to create ~1GB of 20k QML files. With these qmake takes almost a minute. (these could be files not actually relevant to the project and thus not necessary to scan every time)
Attachments
Issue Links
- relates to
-
QTBUG-103187 Reconfiguration is slow due to qmlimportscanner
- Closed