Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 4.3.0
-
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
For Gerrit Dashboard: QTCREATORBUG-18185 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
194286,2 | Autotest: Avoid needless iterations over the project files | 4.3 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
194750,2 | Reduce CPU load of test parsing | 4.3 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |