Review Request 119999: Do not update caches of system headers when the environment changed.
Milian Wolff
mail at milianw.de
Fri Aug 29 22:51:48 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119999/
-----------------------------------------------------------
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/20140829/ecb61add/attachment.html>
More information about the KDevelop-devel
mailing list