Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-102263

iOS: qmake is very slow in large projects

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 6.3.0 RC
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      macOS 11.6, Qt Creator, Qt 6.3.0 iOS
    • Platform/s:
      iOS/tvOS/watchOS

      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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              qtbuildsystem Qt Build System Team
              Reporter:
              Chrisu Christian Bartsch
              Votes:
              7 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes