Review Request 119999: Do not update caches of system headers when the environment changed.

Milian Wolff mail at
Sun Aug 31 21:25:47 UTC 2014

This is an automatically generated e-mail. To reply, visit:

(Updated Aug. 31, 2014, 9:25 p.m.)

Review request for KDevelop, Kevin Funk, Olivier Jean de Gaalon, and Sergey Kalinichev.


Now I try to mark every include path outside of loaded projects as system includes.

Could you try whether that improves the situation? I don#t have time right now to test it, but at least the unit test still works. Not sure what other side-effects the -isystem switch has though. Probably some related to diagnostics?

Repository: kdev-clang

Description (updated)

This greatly improves the performance when we edit two files with
different environments which each include some system includes.
Without this patch, we'd play cache ping-pong on the system includes.

NOTE: This is not yet optimal as we can still play cache ping-pong
for user headers as soon as the include paths or defines for a given
set of includers are different. But maybe this is a first step
and a good idea in general? Feedback welcome!

Mark include paths outside of opened projects as system includes.

This hopefully improves the effectiveness of our checks for
clang_Location_isInSystemHeader. I couldn't test it yet and have
to go to bed now :)

Diffs (updated)

  clangparsejob.cpp 6a9eccda37caf926a19c452a9c30e2143c83d659 
  duchain/clanghelpers.cpp 099b8ea8338afb0dd6a11a336710fe7ffbf00068 
  duchain/clangparsingenvironment.h f70d093a5d3716256ba8dfad965bc9fbf5f877fb 
  duchain/clangparsingenvironment.cpp b90f019871d6f843ad3fd79da97ea83c62067282 
  duchain/clangparsingenvironmentfile.h 72b7aeb962a9a8513df574d534b6ac54855bf1f6 
  duchain/clangparsingenvironmentfile.cpp ab0bf6712ce17a49f4e64caef29e55d98572d000 
  duchain/parsesession.cpp 041e58680f71ed2eff99ff7fd5afb866819d58ec 
  tests/test_duchain.h 3932aad1cb543e640fd6c34e7cfc5ed68f8e0d7f 
  tests/test_duchain.cpp 66ac9f64883f02f68795bbef36a322f3de17d35f 



tried the unit test and also manually tested the following:

    ~~~~~~~ CMakeLists.txt: ~~~~~~~~~~
    cmake_minimum_required(VERSION 2.8.11)
    add_executable(fileA fileA.cpp)
    add_executable(fileB fileB.cpp)

And both fileA.cpp and fileB.cpp just need to have something like this:

    #include <iostream>
    int foo() {}

Now run this in a kdev-clang KDevelop session and enable the corresponding 
debug area. Once both files are cached/highlighted, change one of them, wait 
for the update, then the other. With change I mean e.g. add an argument to the 
function or anything like that, but keep the iostream include.


Milian Wolff

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the KDevelop-devel mailing list