<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/119999/">https://git.reviewboard.kde.org/r/119999/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDevelop, Kevin Funk, Olivier Jean de Gaalon, and Sergey Kalinichev.</div>
<div>By Milian Wolff.</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdev-clang
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This greatly improves the performance when we edit two files with<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
different environments which each include some system includes.<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
Without this patch, we'd play cache ping-pong on the system includes.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">NOTE: This is not yet optimal as we can still play cache ping-pong<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
for user headers as soon as the include paths or defines for a given<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
set of includers are different. But maybe this is a first step<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
and a good idea in general? Feedback welcome!</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">tried the unit test and also manually tested the following:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #666666">~~~~~~~</span> CMakeLists.txt<span style="color: #666666">:</span> <span style="color: #666666">~~~~~~~~~~</span>
cmake_minimum_required(VERSION <span style="color: #666666">2.8.11</span>)
project(test)
add_executable(fileA fileA.cpp)
set_property(TARGET fileA APPEND PROPERTY INCLUDE_DIRECTORIES <span style="color: #BA2121">"/tmp/foo"</span>)
add_executable(fileB fileB.cpp)
set_property(TARGET fileB APPEND PROPERTY INCLUDE_DIRECTORIES <span style="color: #BA2121">"/tmp/bar"</span>)
<span style="color: #666666">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span>
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">And both fileA.cpp and fileB.cpp just need to have something like this:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="border: 1px solid #FF0000">~~~~~~~~~~~~~~~~~~</span>
<span style="color: #19177C">#include</span> <span style="color: #666666"><</span>iostream<span style="color: #666666">></span>
int <span style="color: #008000">foo</span>() {}
<span style="border: 1px solid #FF0000">~~~~~~~~~~~~~~~~~~</span>
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Now run this in a kdev-clang KDevelop session and enable the corresponding <br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
debug area. Once both files are cached/highlighted, change one of them, wait <br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
for the update, then the other. With change I mean e.g. add an argument to the <br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
function or anything like that, but keep the iostream include.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>duchain/clanghelpers.cpp <span style="color: grey">(099b8ea8338afb0dd6a11a336710fe7ffbf00068)</span></li>
<li>duchain/clangparsingenvironmentfile.h <span style="color: grey">(72b7aeb962a9a8513df574d534b6ac54855bf1f6)</span></li>
<li>duchain/clangparsingenvironmentfile.cpp <span style="color: grey">(ab0bf6712ce17a49f4e64caef29e55d98572d000)</span></li>
<li>tests/test_duchain.cpp <span style="color: grey">(66ac9f64883f02f68795bbef36a322f3de17d35f)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/119999/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>