<div dir="ltr"><br class="">(resending without some of the attachments, since the list doesn't like big messages; ask if you want me to send the full Mathematica notebook that I used for the analysis)<br><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Sep 27, 2013 at 2:59 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><div class="h5">On Sat, Sep 14, 2013 at 8:31 AM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>></span> wrote:<br></div></div><div class="gmail_extra">
<div class="gmail_quote"><div><div class="h5">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">
<div><div>On Fri, Sep 13, 2013 at 5:59 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>On Thu, Sep 12, 2013 at 3:07 AM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>></span> wrote:<br>


</div></div><div class="gmail_extra"><div class="gmail_quote"><div><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">
<div>On Wed, Sep 11, 2013 at 8:14 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>On Wed, Sep 11, 2013 at 12:41 PM, Nicholas Gill <span dir="ltr"><<a href="mailto:mythagel@gmail.com" target="_blank">mythagel@gmail.com</a>></span> wrote:<br>




</div><div class="gmail_extra"><div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hello cfe-dev,<div><br></div><div>At present unknown keys in the compile_commands.json file will cause the JSONCompilationDatabase parser to reject the file.</div>





<div><br></div><div>1. Would a patch to relax this constraint be accepted?</div>
<div>2. Would other consumers of the compile_commands.json be negatively impacted by unknown keys?</div></div></blockquote><div><br></div></div><div>Yes. This can be rather big, and being able to quickly parse it is important for interactive use cases.</div>




<div>
<div> </div></div></div></div></div></blockquote><div><br></div></div><div>I don't think that this is a very good reason. Parsing the compilation database in the JSON format is going to take O(project size) work, and anything O(project size) is not going to be adequate for interactive use cases anyway.</div>



</div></div></div></blockquote><div><br></div></div></div><div>How do you come to that conclusion? I've run benchmark on chromium-sized projects, and the interactive use-case worked just fine.</div><div> </div></div>


</div></div></blockquote><div><br></div></div></div><div>On my machine it takes 30ms to parse the compile_commands.json for clang/llvm (measured with perf(1)). Typically interactive response time expectation is 100ms, so 30ms is about 1/3 of the total time available, which IMO is unacceptable. Conversely, a project >3x larger would be noninteractive.</div>

</div></div></div></blockquote><div><br></div></div></div><div>Have you made sure it scales linearly?</div><div>If your analysis is true, it has regressed, and we should fix the YAML parser.</div></div></div></div>
</blockquote></div></div><br><div class="gmail_extra"><br></div><div class="gmail_extra"><div style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">Yes, I'm almost 100% sure that it scales linearly; see the attached plot and raw data. The numbers are given in seconds. The sizes are given proportionally to the original LLVM R+A compile_commands.json (so e.g. 0.5 means half the entries removed, 2 means double the number of entries (I just copied existing entries)).</div>
<div style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br></div><div style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">The timing was done with:</div><div style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
    perf stat -e cpu-clock clang-check -p ../r+a/ lib/IR/IRBuilder.cpp <br></div><div style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">During the course of the analysis, I made IRBuilder.cpp be an empty file.</div>
<div style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br></div><div style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">-- Sean Silva</div><div style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<br></div></div></div>