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

Sergey Kalinichev kalinichev.so.0 at gmail.com
Sat Aug 30 09:14:24 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119999/#review65536
-----------------------------------------------------------


Ok, retested it, it's a bit faster, but still very slow (as of project loading and also swithing between files)

All because of clang_Location_isInSystemHeader returns false for e.g. all Qt include directories and even for some c++ include directories e.g. for me it thinks that /usr/include/c++/4.9/algorithm is not a system header?! (tested with llvm 3.4.2)

So maybe we shouldn't rely on it? I.e. maybe it'd better to check whether a file belongs to a project or not, if there are no project associated with the file then we consider it as a system file, or something like that?

- Sergey Kalinichev


On Aug. 30, 2014, 2:51 a.m., Milian Wolff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119999/
> -----------------------------------------------------------
> 
> (Updated Aug. 30, 2014, 2:51 a.m.)
> 
> 
> Review request for KDevelop, Kevin Funk, Olivier Jean de Gaalon, and Sergey Kalinichev.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> 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!
> 
> 
> Diffs
> -----
> 
>   duchain/clanghelpers.cpp 099b8ea8338afb0dd6a11a336710fe7ffbf00068 
>   duchain/clangparsingenvironmentfile.h 72b7aeb962a9a8513df574d534b6ac54855bf1f6 
>   duchain/clangparsingenvironmentfile.cpp ab0bf6712ce17a49f4e64caef29e55d98572d000 
>   tests/test_duchain.cpp 66ac9f64883f02f68795bbef36a322f3de17d35f 
> 
> Diff: https://git.reviewboard.kde.org/r/119999/diff/
> 
> 
> Testing
> -------
> 
> tried the unit test and also manually tested the following:
> 
>     ~~~~~~~ CMakeLists.txt: ~~~~~~~~~~
>     cmake_minimum_required(VERSION 2.8.11)
>     project(test)
>     
>     add_executable(fileA fileA.cpp)
>     set_property(TARGET fileA APPEND PROPERTY INCLUDE_DIRECTORIES "/tmp/foo")
>     
>     add_executable(fileB fileB.cpp)
>     set_property(TARGET fileB APPEND PROPERTY INCLUDE_DIRECTORIES "/tmp/bar")
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 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.
> 
> 
> Thanks,
> 
> Milian Wolff
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140830/93b53a7c/attachment.html>


More information about the KDevelop-devel mailing list