Revision 4c51375...
Go back to digest for 25th March 2012Optimization in Development Tools
optimize: reduce time required for quickopen (files) to show up
Every time quickopen is shown, we used to compute the ProjectFile
list by iterating over the file sets of each project which among
others was slow due to lots of involved IndexedString and sorting.
Now we keep the (sorted) list, i.e. map, around and listen to
thew new signals in IProject, that notify us about new/removed files.
In my test, this is about one magnitude faster (just around 100ms
on my machine) when dealing with e.g. webkit and it's 180k files.
Before this patch, QuickOpen needed more than a second to show up.
Memory consumption is slightly higher of course, but negleglible.
When you deal with such huge projects, a few mega bytes more or less
don't make a difference imo. We are talking of e.g. ~690MB vs. ~670MB.
File Changes
- interfaces/iproject.h
- shell/project.cpp
- plugins/quickopen/projectfilequickopen.cpp
- plugins/quickopen/projectfilequickopen.h