Do not update caches of system headers when the environment changed.

Review Request #119999 - Created Aug. 29, 2014 and submitted

Information
Milian Wolff
kdev-clang
bf1fc20...
Reviewers
kdevelop
kfunk, olivierjg, skalinichev

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 :)

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.

Issues

  • 0
  • 0
  • 2
  • 2
Description From Last Updated
Sergey Kalinichev
Milian Wolff
Sergey Kalinichev
Kevin Funk
Milian Wolff
Review request changed

Status: Closed (submitted)

Loading...