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

Autotest parsing takes 100% CPU for too long

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.3.0
    • Qt Creator 4.3.0
    • Test Integration
    • None
    • 83b8c8fc154502f847f88e2c1ebd203554382d37

    Description

      Project::files() is called for each open source file in TestCodeParser::onDocumentUpdated(). files() itself is O(n), so we have O(files_in_project*open_files), which is unacceptable for large projects (like qtc itself!).

      To make things worse, TestCodeParser::emitUpdateTestTree() is called by SessionManager::startupProjectChanged, by CppModelManager::projectPartsUpdated and by ProgressManager::allTasksFinished. Each of them scans the entire project tree (unless they're called less than a second from the previous call)...

      To observe this, place a breakpoint in Project::files().

      Attachments

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

        Activity

          People

            con Eike Ziller
            orgads Orgad Shaneh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes