<table><tr><td style="">mwolff requested changes to this revision.<br />mwolff added a comment.<br />This revision now requires changes to proceed.
</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/D18551">View Revision</a></tr></table><br /><div><div><p>it was measured back then:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">commit f14a8fc9ceb38a91c2d718552779da666d509bf1
Author: Sven Brauch <mail@svenbrauch.de>
Date:   Wed Jul 26 00:49:18 2017 +0200

    clang: fix precompiled preamble cache misses
    
    We were a) passing in a wrong file size, and b) a different set of unsaved
    files on building the translation unit as compared to invoking completion.
    This resulted in the precompiled preamble being rebuilt every single time.
    On my test file, time spent in clang_codeCompleteAt goes down from ~700ms
    to ~12ms with this change after the project is fully parsed.
    
    It still doesn't work in header files at all.
    
    Differential Revision: https://phabricator.kde.org/D6905</pre></div>

<p>Maybe the correct fix would be to check if the document is currently open, and if so, directly create the preamble on first parse. If the document isn't open yet, then we don't need to create the preamble yet.</p>

<p>Note that this also needs to work properly when we reparse for code completion, that must create the preamble directly.</p>

<p>As-is, this patch is a no-go, but I would like to see more work in this area. We should probably also create a proper benchmark for this while at it.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D18551">https://phabricator.kde.org/D18551</a></div></div><br /><div><strong>To: </strong>aaronpuchert, KDevelop, mwolff, brauch, rjvbb<br /><strong>Cc: </strong>rjvbb, kdevelop-devel, glebaccon, hase, antismap, iodelay, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd<br /></div>