D7742: KDevelop projects : make use of KDirWatch optional

René J.V. Bertin noreply at phabricator.kde.org
Fri Sep 8 21:24:47 UTC 2017


rjvbb created this revision.
rjvbb added a project: KDevelop.
Restricted Application added a subscriber: kdevelop-devel.

REVISION SUMMARY
  As described on the ML: importing really big projects into a KDevelop session (as well as closing them) can take a really long time during which the main thread runs at full throttle making the UI unresponsive. This is not related to background parsing but to installing watchers on countless directories and/or files.
  
  This was observed on Mac while reopening an session that contained projects for the gcc 6.3.0 and 7.1.0 source trees. Monitoring on-disk changes is unreliable on that platform (= never worked for me) so the workaround is trivial for this kind of projects: don't create KDirWatcher instances for "huge" projects. With that workaround even the gcc projects load in what seems to be a reasonable time; exitting KDevelop becomes a lot faster too.

TEST PLAN
  Developed in the 5.1 branch on OS X 10.9 with Qt 5.8 and KF5 5.35.0; tested on Linux with the same versions. I'm not certain to what extent the underlying issue exists on Linux; my Linux system is simply not powerful enough to expect reasonable snappiness working with projects this big.
  
  I've decided to make `IProjectController::watchAllProjectDirectories()` a regular, virtual method instead of a static like `parseAllProjectSources()` ; the idea is that this would allow to make this new option apply on a per-project base with the session-level setting a default/fallback.

REPOSITORY
  R32 KDevelop

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

AFFECTED FILES
  kdevplatform/interfaces/iprojectcontroller.cpp
  kdevplatform/interfaces/iprojectcontroller.h
  kdevplatform/project/abstractfilemanagerplugin.cpp
  kdevplatform/shell/settings/projectconfig.kcfg
  kdevplatform/shell/settings/projectpreferences.ui

To: rjvbb, #kdevelop
Cc: kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170908/e8d9026d/attachment.html>


More information about the KDevelop-devel mailing list