kdev-clang: selectively apply ForceUpdate to the requested document
When we get a parse job with the ForceUpdate flag set, we used to apply this flag to all imports. So basically ForceUpdateRecursive and ForceUpdate where handled in the same way, which is obviously not a good idea. Instead, track the document for which the parse job got created and only apply ForceUpdate to that one. This greatly improves the performance of reparsing after switching git branches or using git stash: These actions would always trigger a document reload and a parse job is created with ForceUpdate set. Previously, this then meant that we reparsed all imports too. For files with many imports, this was extremely slow and totally unneeded. As an example: Editing heaptrack's accumulatedtracedata.cpp and then applying `git stash` tackes ~34s on my machine before this patch. With this patch, it only takes ~200ms instead.
Showing with 22 additions and 15 deletions