<table><tr><td style="">rjvbb updated this revision to Diff 20162.<br />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/D7995" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>This modified version of the patch follows a suggestion from the Qt ML, using a <tt style="background: #ebebeb; font-size: 13px;">FileManagerListJob::watchDir(path)</tt> signal connected to a slot (lambda) in <tt style="background: #ebebeb; font-size: 13px;">AbstractFileManagerPluginPrivate</tt> with <tt style="background: #ebebeb; font-size: 13px;">Qt::QueuedConnection</tt>. This removes the need for a mutex since the watcher instance is now used on a single thread exclusively (in the code I touch).</p>
<p>In addition I now export the project filter to the ProjectWatcher class, which makes it possible to ignore add requests for folders that the project manager is supposed to ignore. (I assume there is no point in watching such folders, correct me if I'm wrong.)<br />
Typical threspassers are the <tt style="background: #ebebeb; font-size: 13px;">.git</tt> and <tt style="background: #ebebeb; font-size: 13px;">build</tt> folders; not adding them speeds up dirwatcher set-up even more (and minimises resource usage).</p></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D7995?vs=20064&id=20162" rel="noreferrer">https://phabricator.kde.org/D7995?vs=20064&id=20162</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7995" rel="noreferrer">https://phabricator.kde.org/D7995</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kdevplatform/project/CMakeLists.txt<br />
kdevplatform/project/abstractfilemanagerplugin.cpp<br />
kdevplatform/project/abstractfilemanagerplugin.h<br />
kdevplatform/project/filemanagerlistjob.cpp<br />
kdevplatform/project/filemanagerlistjob.h<br />
kdevplatform/project/projectwatcher.cpp<br />
kdevplatform/project/projectwatcher.h<br />
kdevplatform/project/tests/CMakeLists.txt<br />
kdevplatform/project/tests/abstractfilemanagerpluginimportbenchmark.cpp</div></div></div><br /><div><strong>To: </strong>rjvbb, KDevelop, mwolff<br /><strong>Cc: </strong>aaronpuchert, arrowdodger, kfunk, dfaure, mwolff, brauch, kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight<br /></div>