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

Simple yet very efficient android deployment (qmlimportscanner) optimization

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.2
    • None
    • Android, Windows

    Description

      qmlimportscanner.exe is quite slow and it makes the whole deployment to android very slow.

      This is a very simple multithreading optimization to parse the files in different threads.

       

      The whole deployment of my simple project in QtCreator to my Android device, with no compilation, only the deployment, was taking 2min05 and it now takes 34s.

       

      And it can probably be optimized even more.

      for (const QFileInfo &x : entries)
                  if (x.isFile())
                      ret = mergeImports(ret, findQmlImportsInFile(x.absoluteFilePath()));
      

      to

      QList<QString> absoluteFilePathes;
              for (const QFileInfo &x : entries)
                  if (x.isFile())
                      absoluteFilePathes.push_back(x.absoluteFilePath());        QFuture< QVariantList > res;
              res = QtConcurrent::mappedReduced(absoluteFilePathes, findQmlImportsInFile, mergeImports2);
              res.waitForFinished();ret += res.result();
      

       

      Attachments

        Issue Links

          Activity

            People

              qtandroidteam Qt Android Team
              satirik Jean Delajungle
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: