<table><tr><td style="">mwolff created this revision.<br />Restricted Application added a subscriber: kdevelop-devel.<br />mwolff requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D12298">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>I noticed that we sometimes wait quite long on code completion<br />
requests, especially when editing header files. The edit operation<br />
in a header invalidates the preamble, so reparsing will always take<br />
quite some time. Nothing we can do about that, really. But at least<br />
we can make sure we don't do work for naught:</p>

<p>The old code just emitted signals whenever code completion is invoked.<br />
This can happen multiple times while we are editing the header. Since<br />
the computation takes time, the subsequent completion requests pile<br />
up and will all be handled eventually. If you are then impatient and<br />
go to a different file, we will still go through all requests even<br />
though they are not interesting anymore.</p>

<p>This patch groups the completion requests together with a simple<br />
timer to ensure we only handle the last request once the current<br />
completion job has finished.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D12298">https://phabricator.kde.org/D12298</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>plugins/clang/codecompletion/model.cpp</div></div></div><br /><div><strong>To: </strong>mwolff<br /><strong>Cc: </strong>kdevelop-devel<br /></div>