Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25899

QmlJS::ModelManagerInterface::updateProjectInfo blocks Qt Creator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • Qt Creator 4.15.1, Qt Creator 5.0.0-beta1
    • Quick / QML Support
    • None

    Description

      • open qt-creator/CMakeLists.txt as a project in Qt Creator
      • wait for it to configure/scan/parse QML (don't have to wait for C++ parsing)
      • trigger Build > Run CMake
      • wait for configuration to finish
      • notice the freeze at that point

      The freeze is due to several things happening in Qt Creator in the main thread that shouldn't happen there. There are patches for some of these things already in master branch or in review.

      One 0.5-1 second part of the freeze is due to QmlJS::ModelManagerInterface::updateProjectInfo

      Round about 3/4 of that time is spent in ModelManagerInterface::updateImportPaths(), and almost all of that time is spent in QmlJS::modulePaths.

      A small part there is spent with the QRegularExpression, and the larger part is QDir::exists() - modulePaths is called about 3000 times (multiple times for each of the ~1600 QML files that are part of the snapshot after first parse) when reconfiguring Qt Creator, resulting in ~25000 calls of QDir::exists().

      Attachments

        1. parsing.png
          parsing.png
          42 kB
        2. parsing.ptq
          8.40 MB

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              con Eike Ziller
              Votes:
              9 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes