Revision acabbf5...
Go back to digest for 11th September 2011Optimization in Development Tools
Milian Wolff committed changes in [kdevplatform] /:
optimize: implement hash-based lookup for itemsForUrl
When loading big projects with lots of files, much time was spent in
Project::itemsForUrl (up to a minute in total in one of my tests).
Now we use a QHash<uint, ProjectBaseItem*> lookup table, which brings
down the total time to a mere fraction of a second.
The lookup table is saved in the ProjectModel and is updated on demand
from the ProjectBaseItem.
Introduces a new ProjectModel::itemsForUrl which will return all files
for a url without filtering by project.
File Changes
Modified 5 files
- project/projectmodel.cpp
- project/projectmodel.h
- shell/project.cpp
- language/duchain/indexedstring.cpp
- language/duchain/indexedstring.h
5 files changed in total