GenericProjectManager improvements
Andreas Pakulat
apaku at gmx.de
Sat Oct 4 17:32:20 UTC 2008
On 04.10.08 18:06:13, Niko Sams wrote:
> >> >> 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?
I think thats the better idea, that way the project toolview can do the
watching and just refresh the changed files or directories (if files/dirs were
added/removed).
BTW: For things like CMake or QMake this doesn't solve everything at the
moment, because a change in one CMakeLists.txt can influence other files
and CMake support currently has no way of finding out which other files are
affected - thats why it always reloads the complete model.
> 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)
Actually Eclipse also can do a watching for external edits and automatic
updating :)
Andreas
--
You never hesitate to tackle the most difficult problems.
More information about the KDevelop-devel
mailing list