<table><tr><td style="">rjvbb 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/D7742" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>This new revision also includes temporary (a priori) code to obtain timing estimates and a hack to disable the full defer (dirwatcher creation is always deferred to after the project was imported). I'm including that additional code so others can get some timing estimates from their work flow too.</p>

<p>Here are some timing results on my 2011 MacBook Pro with 2.7Ghz i7, as requested by Sven on <a href="https://phabricator.kde.org/D7745" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: line-through;" rel="noreferrer">D7745</a>:</p>

<p>A session with projects for the 5.1 branches of KDevelop and KDevPlatform + the Purpose project. The non-deferred dirwatcher timings are probably better than what KDevelop achieves now since the current version of the patch creates them after importing the project and not before.</p>

<p>dir watching, no full parse<br />
<tt style="background: #ebebeb; font-size: 13px;">deferred: import = 3.9—4.7 seconds, creating the watchers = 1.4—1.6 seconds</tt> (vs. <em>0.2 seconds</em> on a much slower Linux rig!)<br />
non deferred (debug output):</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);">kdevplatform.shell: Project "purpose-git" imported in 4.405 seconds
kdevplatform.filemanager: Project dir monitoring is enabled for project "purpose-git"
kdevplatform.shell:      "purpose-git" : creating dir watchers and/or starting parse jobs took an additional 5.051 seconds
kdevplatform.shell: Project "kf5-kdevplatform-devel (MP)" imported in 2.261 seconds
kdevplatform.filemanager: Project dir monitoring is enabled for project "kf5-kdevplatform-devel (MP)"
kdevplatform.shell:      "kf5-kdevplatform-devel (MP)" : creating dir watchers and/or starting parse jobs took an additional 2.74 seconds
kdevplatform.filemanager: Project dir monitoring is enabled for project "kf5-kdevelop-5 (MP)"
kdevplatform.shell: Project "kf5-kdevelop-5 (MP)" imported in 3.792 seconds
kdevplatform.filemanager: Project dir monitoring is enabled for project "kf5-kdevelop-5 (MP)"
kdevplatform.shell:      "kf5-kdevelop-5 (MP)" : creating dir watchers and/or starting parse jobs took an additional 3.792 seconds</pre></div>

<p>2nd run:</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);">kdevplatform.shell: Project "purpose-git" imported in 3.193 seconds
kdevplatform.filemanager: Project dir monitoring is enabled for project "purpose-git"
kdevplatform.shell:      "purpose-git" : creating dir watchers and/or starting parse jobs took an additional 3.559 seconds
kdevplatform.shell: Project "kf5-kdevplatform-devel (MP)" imported in 1.481 seconds
kdevplatform.filemanager: Project dir monitoring is enabled for project "kf5-kdevplatform-devel (MP)"
kdevplatform.shell:      "kf5-kdevplatform-devel (MP)" : creating dir watchers and/or starting parse jobs took an additional 1.921 seconds
kdevplatform.filemanager: Project dir monitoring is enabled for project "kf5-kdevelop-5 (MP)"
kdevplatform.shell: Project "kf5-kdevelop-5 (MP)" imported in 2.86 seconds
kdevplatform.filemanager: Project dir monitoring is enabled for project "kf5-kdevelop-5 (MP)"
kdevplatform.shell:      "kf5-kdevelop-5 (MP)" : creating dir watchers and/or starting parse jobs took an additional 2.86 seconds</pre></div>

<p>no dir watching, full parse (parsing cache uptodate)<br />
<tt style="background: #ebebeb; font-size: 13px;">deferred: import = 4—4.9 seconds, starting the parsers = 0.08—0.13 seconds</tt><br />
non deferred:</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);">kdevplatform.shell: Project "purpose-git" imported in 3.165 seconds
kdevplatform.shell:      "purpose-git" : creating dir watchers and/or starting parse jobs took an additional 3.17 seconds
kdevplatform.shell: Project "kf5-kdevplatform-devel (MP)" imported in 1.328 seconds
kdevplatform.shell:      "kf5-kdevplatform-devel (MP)" : creating dir watchers and/or starting parse jobs took an additional 1.396 seconds
kdevplatform.shell: Project "kf5-kdevelop-5 (MP)" imported in 1.517 seconds
kdevplatform.shell:      "kf5-kdevelop-5 (MP)" : creating dir watchers and/or starting parse jobs took an additional 1.57 seconds</pre></div>

<p>2nd run</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);">kdevplatform.shell: Project "purpose-git" imported in 3.432 seconds
kdevplatform.shell:      "purpose-git" : creating dir watchers and/or starting parse jobs took an additional 3.436 seconds
kdevplatform.shell: Project "kf5-kdevplatform-devel (MP)" imported in 1.235 seconds
kdevplatform.shell:      "kf5-kdevplatform-devel (MP)" : creating dir watchers and/or starting parse jobs took an additional 1.3 seconds
kdevplatform.shell: Project "kf5-kdevelop-5 (MP)" imported in 1.598 seconds
kdevplatform.shell:      "kf5-kdevelop-5 (MP)" : creating dir watchers and/or starting parse jobs took an additional 1.657 seconds</pre></div>

<p>Apparently the benefit of parser deferral is negligible on projects this size when the parser cache is uptodate and the system isn't stressed. Things hardly changed after I emptied the session cache directory:</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);">kdevplatform.shell: Project "purpose-git" imported in 3.382 seconds
kdevplatform.shell:      "purpose-git" : creating dir watchers and/or starting parse jobs took an additional 3.387 seconds
kdevplatform.shell: Project "kf5-kdevplatform-devel (MP)" imported in 1.603 seconds
kdevplatform.shell:      "kf5-kdevplatform-devel (MP)" : creating dir watchers and/or starting parse jobs took an additional 1.633 seconds
kdevplatform.shell: Project "kf5-kdevelop-5 (MP)" imported in 1.894 seconds
kdevplatform.shell:      "kf5-kdevelop-5 (MP)" : creating dir watchers and/or starting parse jobs took an additional 1.971 seconds</pre></div>

<p>As I mentioned before, my initial idea for this change dates back to KDevelop4, where disabling "Parse All Project Files" did have a big effect on session load times (I also ran an earlier OS version without runtime RAM compression and with less RAM to boot so saw much more disk swapping).</p>

<p>I continue to think though that the parser defer modification is small enough to be justified as it also makes things cleaner and should help keep the UI snappier when the system does become stressed.</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/D7742" rel="noreferrer">https://phabricator.kde.org/D7742</a></div></div><br /><div><strong>To: </strong>rjvbb, KDevelop<br /><strong>Cc: </strong>kossebau, arrowdodger, brauch, zhigalin, kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight<br /></div>