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:
Thomas Hartmann
2022-11-23 09:32:45 +01:00
parent 910a8864dc
commit d0a07dcacb
7 changed files with 18 additions and 10 deletions

View File

@@ -281,7 +281,7 @@ void ModelManager::delayedInitialization()
ViewerContext qbsVContext;
qbsVContext.language = Dialect::QmlQbs;
qbsVContext.paths.append(ICore::resourcePath("qbs"));
qbsVContext.paths.insert(ICore::resourcePath("qbs"));
setDefaultVContext(qbsVContext);
}