Skip to content

Optimize Quick Open reset()

See commit messages for details. I can list more specific benchmark results if the numbers in the commit messages are not enough. I benchmarked opening both kdevelop and WebKit projects. kdevelop with 7 open files didn't benefit nearly as much as WebKit with 13 open files from the first commit. But the third commit sped up reset() for kdevelop 12.5 times too.

https://invent.kde.org/igorkushnir/kdevelop/-/commits/quickopen-bench-reset is my step-by-step experimental branch. I can provide numbers for each of its detailed commits too, if a reviewer shows interest in them.

Note that the numbers for the WebKit project specified in the commit messages were obtained by a somewhat modified tmp commit in the experimental branch linked to above. Turns out that up until the last commit in this merge request, the setItems() call at the end of ProjectFileDataProvider::reset() takes a long time, because it has to destroy the old overwritten QVector. Therefore, in order to obtain accurate numbers for the commit messages, I started the timer at the very beginning and called printTime() at the very end of reset().

Merge request reports