<div dir="ltr">Hi Vladimir,<div><br></div><div>Thanks for sharing your experience.</div><div><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF">We did such measurements when evaluated clang as a technology to be
    used in NetBeans C/C++, I don't remember the exact absolute numbers
    now, but the conclusion was: </div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF">
    to be on par with the existing NetBeans speed we have to use
    different caching, otherwise it was like 10 times slower.</div></blockquote><div>It's a good reason to focus on that issue from the very start than. Would be nice to have some exact measurements, though. (i.e. on LLVM).</div><div>Just to know how slow exactly was it.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF">
    +1. Btw, may be It is worth to set some expectations what is
    available during and after initial index phase.<br>
    I.e. during initial phase you'd probably like to have navigation for
    file opened in editor and can work in functions bodies.<br></div></blockquote><div>We definitely want diagnostics/completions for the currently open file to be available. Good point, we definitely want to explicitly name the available features in the docs/discussions.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF">As to initial indexing:<br>
    Using PTH (not PCH) gave significant speedup.</div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF">
    Skipping bodies gave significant speedup, but you miss the
    references and later have to reindex bodies on demand.<br>
    Using chainged PCH gave the next visible speedup.<br></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF">Of course we had to made some hacks for PCHs to be more often
    "reusable" (comparing to strict compiler rule) and keep multiple
    versions. In average 2: one for C and one for C++ parse context.<br>Also there is a difference between system headers and projects
    headers, so systems' can be cached more aggressively. <br></div></blockquote><div>Is this work open-source? The interesting part is how to "reuse" the PCH for a header that's included in a different order. </div><div>I.e. is there a way to reuse some cached information(PCH, or anything else) for <map> and <vector> when parsing these two files:<br></div><div>```</div><div>// foo.cpp</div><div>#include <vector></div><div>#include <map></div><div>...</div><div><br></div><div>// bar.cpp</div><div>#include <map></div><div>#include <vector></div><div>....</div><div>```</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Regards,</div><div>Ilya Biryukov</div></div></div></div></div>
</div></div></div>