D7995: KDevelop: address dirwatching inefficiency (WIP/PoC)

René J.V. Bertin noreply at phabricator.kde.org
Sat Sep 30 15:53:25 UTC 2017


rjvbb updated this revision to Diff 20162.
rjvbb added a comment.


  This modified version of the patch follows a suggestion from the Qt ML, using a `FileManagerListJob::watchDir(path)` signal connected to a slot (lambda) in `AbstractFileManagerPluginPrivate` with `Qt::QueuedConnection`. This removes the need for a mutex since the watcher instance is now used on a single thread exclusively (in the code I touch).
  
  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.)
  Typical threspassers are the `.git` and `build` folders; not adding them speeds up dirwatcher set-up even more (and minimises resource usage).

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D7995?vs=20064&id=20162

REVISION DETAIL
  https://phabricator.kde.org/D7995

AFFECTED FILES
  kdevplatform/project/CMakeLists.txt
  kdevplatform/project/abstractfilemanagerplugin.cpp
  kdevplatform/project/abstractfilemanagerplugin.h
  kdevplatform/project/filemanagerlistjob.cpp
  kdevplatform/project/filemanagerlistjob.h
  kdevplatform/project/projectwatcher.cpp
  kdevplatform/project/projectwatcher.h
  kdevplatform/project/tests/CMakeLists.txt
  kdevplatform/project/tests/abstractfilemanagerpluginimportbenchmark.cpp

To: rjvbb, #kdevelop, mwolff
Cc: aaronpuchert, arrowdodger, kfunk, dfaure, mwolff, brauch, kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170930/c0fe207a/attachment.html>


More information about the KDevelop-devel mailing list