<div dir="ltr">Hi everyone,<div><br></div><div>The problem with PCHs(either chained or not) is that they only work for the source file, </div><div>i.e. you can only use it when you start the new file from scratch, right? For header caching we</div><div>really want to reuse whatever information we have cached even if it's included in a different </div><div>context(i.e. the order of includes is different in the other translation unit), which is not possible with PCHs.</div><div><br></div><div>My point is that it's not at all straightforward how(or if?) the PCHs can improve performance of processing </div><div>the same header twice.</div><div><br></div><div>And as long as building an index is as fast as a recompile and we can reuse information from the previous </div><div>version(slightly outdated) the index while the new version is building, we can probably get a good enough </div><div>UX without any compromises on correctness(and introducing additional complexity, since I don't think there's</div><div>a way to do header caching without significant changes to clang itself).</div><div><br></div><div>CLion indeed has a custom parser and serialization format, it's not clang-based.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 18, 2017 at 10:33 PM, Marc-André Laperle via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div dir="ltr">
<div id="m_2388803691680430024x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Yeah, it sounds like a good approach to tackle header caching a bit later. "P<span>recompiled preamble" looks promising so we can keep this in mind as we go.</span></p>
<p><span><br>
</span></p>
<p><span>Cheers,</span></p>
<p><span>Marc-André<br>
</span></p>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_2388803691680430024x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Doug Schaefer <<a href="mailto:dschaefer@blackberry.com" target="_blank">dschaefer@blackberry.com</a>><br>
<b>Sent:</b> Thursday, May 18, 2017 10:44:18 AM<br>
<b>To:</b> Marc-André Laperle; via cfe-dev<br>
<b>Cc:</b> <a href="mailto:zeratul976@hotmail.com" target="_blank">zeratul976@hotmail.com</a>; <a href="mailto:zaks.anna@gmail.com" target="_blank">zaks.anna@gmail.com</a>; Dániel Krupp; Zoltan Porkoláb; Marton Csordas<br>
<b>Subject:</b> Re: Adding indexing support to Clangd</font>
<div> </div>
</div>
</div><span class="">
<font size="2"><span style="font-size:10pt">
<div class="m_2388803691680430024PlainText">On 2017-05-17, 6:38 PM, "Marc-André Laperle"<br>
<<a href="mailto:marc-andre.laperle@ericsson.com" target="_blank">marc-andre.laperle@ericsson.<wbr>com</a>> wrote:<br>
> - For header caching, I wonder if it is possible to reuse the<br>
>precompiled header support in Clang. There would be some logic that would<br>
>decide whether or not a precompiled header could be used depending on the<br>
>preprocessing context (same macro definitions, etc).<br>
<br>
I¹m not certain header cacheing is needed right away. We did it in the CDT<br>
because our parsers were fairly slow and indexing a project took a very<br>
long time. I have hope that clang would be faster. At the very least, you<br>
would want cacheing to be optional so you need to be able to work without<br>
it. But make sure you have the architecture to graft it in later.<br>
<br>
In CDT we cheated a lot to gain performance and the cost of accuracy. The<br>
results are still very good so its an interesting balancing act.<br>
<br>
Doug Schaefer<br>
Eclipse CDT Project Lead<br>
<br>
</div>
</span></font>
</span></div>
<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Regards,</div><div>Ilya Biryukov</div></div></div></div></div>
</div>