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

Simple yet very efficient android deployment (qmlimportscanner) optimization

XMLWordPrintable

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

      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();
      

       

        For Gerrit Dashboard: QTBUG-102610
        # Subject Branch Project Status CR V

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

              Created:
              Updated:

                There is 1 open Gerrit change