<table><tr><td style="">mwolff added a comment.
</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/D8059" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D8059#159018" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">D8059#159018</a>, <a href="https://phabricator.kde.org/p/rjvbb/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;" rel="noreferrer">@rjvbb</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><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);">The number of calls to addDir is totally uninteresting. Even more so as before it was/is recursive internally while you are about to change it. So what value is there when the benchmark shows "1 call to addDir" now, and then eventually "1000 calls to addDir"?!

Again: We only care about the time it takes to import the project.</pre></div></blockquote>

<p>Please read me carefully. I DO care about more than time alone. If it takes 10 hours to add a quadrizillion directories I might be happy, but not if it takes 10 minutes to add only 5 directories (directory content shouldn't matter since we're watching only directories).</p>

<p>Printing the number of directories loaded is only appropriate if we know that it corresponds to the exact number of directories watched. We don't know that here, there are 2 different models at play.</p>

<p>Please don't try to teach me how to set up experiments (and I won't try to explain what the PS in FLOPS stand for).</p></div>
</blockquote>

<p>Your experiment is pointless, so of course I'll teach you. I won't accept the patch as-is, so would you rather I just say no without giving an explanation?</p>

<p>One more try in teaching you how this is supposed to be used:</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">run benchmark with <tt style="background: #ebebeb; font-size: 13px;">perf stat -r 5</tt> on a predefined folder structure, let's say GCC source dir, remember the output, this is your baseline</li>
<li class="remarkup-list-item">apply a patch that supposedly optimizes something (e.g. apply the filter before watching a dir)</li>
<li class="remarkup-list-item">rerun the benchmark on the same folder, again with <tt style="background: #ebebeb; font-size: 13px;">perf stat -r 5</tt></li>
<li class="remarkup-list-item">compare the output of the two <tt style="background: #ebebeb; font-size: 13px;">perf stat</tt> runs.</li>
</ol>

<p>Since the benchmark input (e.g. GCC source dir) does not change in between, the number of dirs is not interesting at all. We only care about whether the import after applying the patch is faster or not. All of this information would then be put into the commit message of the patch and then pushed up for review, along with all information that is required for someone else to reproduce the test.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><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);">On Linux or on Mac?</pre></div></blockquote>

<p>On both. I should have kept this information to my self, I've only been posting and comparing the stabilised scores anyway.</p></blockquote>

<p>What is a stabilised score?</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><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);">So the issue for you is maybe that you are tracking the build folder as part of the project?</pre></div></blockquote>

<p>The benchmark cannot exclude anything under the target directory, and the current dirwatcher implementation cannot either (it lets KDirWatch::addDir() do its recursive thing). Neither have filters set up.</p></blockquote>

<p>The point is: I don't have the build dir as part of the project, so maybe that's why it's so much faster for me?</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><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);">What happens when you move that build dir to a sibling folder?</pre></div></blockquote>

<p>Load times decrease, evidently.</p></blockquote>

<p>By how much?</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>I rarely use in-tree build dirs, so the build directory is NOT what is slowing things down under normal use.</p></blockquote>

</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/D8059" rel="noreferrer">https://phabricator.kde.org/D8059</a></div></div><br /><div><strong>To: </strong>rjvbb, KDevelop, mwolff<br /><strong>Cc: </strong>mwolff, kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger<br /></div>