Optimize CMakeManager::fileInformation for path lookups

Authored by mwolff on Mar 5 2020, 2:06 PM.

Description

Optimize CMakeManager::fileInformation for path lookups

KDevelop will try to parse all C++ files in a project, independent
of whether they are actually part of any CMake file. This is great
for new files that aren't added yet, or for temporary test files.

But the lookup of the include/define metadata for such indirect files
was exceedingly expensive since we had to iterate the folder hierarchy
potentially a lot.

Now, we build a lookup table for folders too which greatly reduces
the amount of lookups we have to do. In a project I'm working on,
this has a huge performance impact when reloading a project, e.g.
after a cmake file was changed.

Details

Committed
mwolffMar 5 2020, 2:06 PM
Parents
R32:716ca19830fd: Do not force update when reloading projects
Branches
Unknown
Tags
Unknown