forked from qt-creator/qt-creator
QmlJS: std::set instead of QList
This reduces the CPU time of Export::visibleInVContext() from 50% to 15% on Windows, when switching files. Change-Id: Iff82924c47d1b696c9d3d7ca40f49d9d02bcb3e6 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -58,7 +58,7 @@ void scanDirectory(const QString &dir)
|
||||
ModelManagerInterface::instance(), false);
|
||||
ModelManagerInterface::instance()->test_joinAllThreads();
|
||||
ViewerContext vCtx;
|
||||
vCtx.paths.append(dirPath);
|
||||
vCtx.paths.insert(dirPath);
|
||||
Snapshot snap = ModelManagerInterface::instance()->snapshot();
|
||||
|
||||
ImportDependencies *iDeps = snap.importDependencies();
|
||||
@@ -176,7 +176,10 @@ void tst_ImportCheck::test()
|
||||
ModelManagerInterface::instance(), false);
|
||||
ModelManagerInterface::instance()->test_joinAllThreads();
|
||||
ViewerContext vCtx;
|
||||
vCtx.paths.append(pathPaths);
|
||||
|
||||
for (const Utils::FilePath &path : pathPaths)
|
||||
vCtx.paths.insert(path);
|
||||
|
||||
Snapshot snap = ModelManagerInterface::instance()->snapshot();
|
||||
|
||||
ImportDependencies *iDeps = snap.importDependencies();
|
||||
|
||||
Reference in New Issue
Block a user