GenericProjectManager improvements

Niko Sams niko.sams at gmail.com
Sat Oct 4 16:06:13 UTC 2008


>> >> 1. detect filesystem changes (new files, files removed)
>> > Make sure to not watch about too many things, this can slow down things and
>> > it can lead to some watchings not done at all, because at least one
>> > implementation of kdirwatcher (inotify) has a maximum number of watchable
>> > files/dirs.
>> Can't I watch a folder recursively? WatchMode::WatchSubDirs
>
> I don't know, but I suspect that doesn't change anything because KDirWatch
> will simply add inotify-watches for all of the subdirs.
Yep, right. But cmake has the same problem then - as it adds a watch for every
CMakeList.txt - and that is more or less the same as waching all directories.
I just commited a version that uses WatchSubDirs.

So what can we do about it to improve the situation (for all Managers)?

Two ideas:
It could be solved by watching only currently used files and directories (open
branches in the project view, open files)
I guess KDirModel works that way?

Or we reload only when the file was created/edited within KDevelop (we
know that).
For detecting changes made outside KDevelop the user has to refresh manually.
(Eclipse does that)

Niko




More information about the KDevelop-devel mailing list