D7745: KDevelop (full) project parsing: defer until all projects have been loaded.

Aaron Puchert noreply at phabricator.kde.org
Sun Sep 17 13:59:09 UTC 2017


aaronpuchert added a comment.


  In https://phabricator.kde.org/D7745#146271, @rjvbb wrote:
  
  > Seriously, how many of us use KDevelop to work on projects the size of GCC or llvm and need dirwatching on the whole tree? How expensive is that on Linux, *after* the initial import?
  
  
  Watching directories is quite essential when working with Git or other SCMs. When checking out another branch, I want KDevelop's file tree to be updated as well.
  
  I think the main problem here is that `KDirWatch` uses vastly different implementations. As it says in `kdirwatch.h`:
  
  > The implementation uses the INOTIFY functionality on LINUX. Otherwise the FAM service is used, when available. As a last resort, a regular polling for change of modification times is done; the polling interval is a global config option: DirWatch/PollInterval and DirWatch/NFSPollInterval for NFS mounted directories.
  
  I guess inotify <https://linux.die.net/man/7/inotify> is quite efficient as an API for exactly that purpose, while the fallback methods are not. So maybe it makes sense to have some size restriction based on the method used in KDirWatch, which can be obtained via `KDirWatch::internalMethod()`. Of course it takes some time to open a large file tree even on Linux, but no longer than other IDEs I know of.
  
  > Maybe the proposed checkbox to en/disable dirwatching should be coupled with a project-level per-directory setting, "watch this directory for changes", hidden simply (?) in the directory context menu and/or the "project filter" settings.
  > 
  > Come to think of it, this is really something that can be compared to mail folder synchronisation. In KMail you can indicate for each folder if it has to be included in the scheduled email check (the version I use supports IMAP IDLE only on the inbox), but a sync will be performed each time to select a folder. In KDevelop this could be coupled to directory expansion in the project manager. I don't know if that's doable API-wise, but I like the idea, it sounds a lot quicker than doing a right-click and selecting the "Reload" action.
  
  That works if your main method to open files is to use the project manager. However, some people prefer opening files via the //Quick Open// bar. In that case you want to watch the entire tree, otherwise new files might be invisible for a long time.
  
  The difference between IMAP and our situation is that in the former case there is a network connection (usually WAN), while in the latter case all files are typically local.

REPOSITORY
  R32 KDevelop

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

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


More information about the KDevelop-devel mailing list