Commit 269545bb authored by Erik Verbruggen's avatar Erik Verbruggen

Todo: 10x speed-up open-file tracking.

When idle-timer fires for the Todo plug-in, this method gets hit. When
I have qtcreator.pro loaded, and 1 file open, and hit enter once, this
change reduces time spend in this method from 223ms to 22ms of UI
thread activity.

Change-Id: I76234601d39605a85e89700d18dd017ac1b8a902
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 7406761f
......@@ -108,7 +108,7 @@ void TodoItemsProvider::createScanners()
void TodoItemsProvider::setItemsListWithinStartupProject()
{
QHashIterator<QString, QList<TodoItem> > it(m_itemsHash);
QStringList fileNames = m_startupProject->files(ProjectExplorer::Project::ExcludeGeneratedFiles);
QSet<QString> fileNames = QSet<QString>::fromList(m_startupProject->files(ProjectExplorer::Project::ExcludeGeneratedFiles));
while (it.hasNext()) {
it.next();
if (fileNames.contains(it.key()))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment