Dirty files

Andreas Pakulat apaku at gmx.de
Tue May 18 07:30:21 UTC 2010


On 18.05.10 06:20:47, Christoph Cullmann wrote:
> Andreas Pakulat wrote:
> > On 17.05.10 21:56:43, Esben Mose Hansen wrote:
> >   
> >> On Sunday 16 May 2010 22:37:39 Andreas Pakulat wrote:
> >>     
> >>> Sure, but one needs to know the limits too. Unfortunately KDirWatch is
> >>> not well documented wrt. its limits.
> >>>       
> >> If KDirWatch uses inotify (which is likely), then the limit is 8192 on my 
> >> machine to be exact. From reading the code, there seems to be no other limits. 
> >>     
> >
> > Actually all distro's use the fam/gamin-backend afaik, as thats the only one
> > which supports NFS properly. And I always thought its 8k files per
> > KDirWatch instance if inotify is being used.
> >
> >   
> >> That would almost be a problem for kdebase, with 4000+ cpp+h files and 
> >> possibly that many generated files of assorted kinds. However, inotify can be 
> >> set to watch the directories that the files reside in instead, drastically 
> >> reducing the need for watchers, at the price of getting some events we are not 
> >> interested in.
> >>     
> >
> > Actually, we might not even get the notifications we're interested in,
> > see the api dox of dirty(). It might not be emitted when files change
> > their size/attribute, its only guaranteed to be emitted when files are
> > being created/deleted.
> >
> >   
> >> I can find no limits for the less like case of using libfam/famd.
> >>     
> >
> > Its actually more likely (although I've disabled it here) as its the
> > default and as I said above the default in distro-packages too.
> >   
> Just sidenote: I once talked with some KDAB guy about kdirwatch and the
> segfaults we got in KDE 4.4.0,
> his opinion was, that kdirwatch is really a pain, as it works in the
> mainthread and will stall your app on each of the notifications.
> He though of implementing it threaded, but never did so.
> QFileSystemWatch or how it is named on the other hand hasn't that flaw,
> he told.

Maybe, but it also doesn't provide the nice API that KDirWatch does. In
particular it only tells us that "something" happened, not what exactly.

Also it doesn't work very nicely on remote-mounts, as it only uses
inotify on Linux.

Andreas

-- 
If you sow your wild oats, hope for a crop failure.




More information about the KDevelop-devel mailing list