[kde-freebsd] QFilesSystemWatcher instead of polling/FAM
Jason E. Hale
bsdkaffee at gmail.com
Fri Jul 9 02:32:00 CEST 2010
On Thursday, July 08, 2010 17:47:51 Tijl Coosemans wrote:
> On Thursday 08 July 2010 01:19:26 Jason E. Hale wrote:
> > On Friday, June 25, 2010 12:37:53 Tijl Coosemans wrote:
> >> KDE currently uses polling to detect file and directory changes on
> >> FreeBSD, which can use up cpu time (and laptop battery power). The
> >> kded4 process seems to make heavy use of this and currently
> >> continuously consumes about 5% of my cpu and often causes it to be
> >> throttled up by powerd.
> >>
> >> I've attached a patch that makes KDE use QFileSystemWatcher on FreeBSD
> >> which uses kqueue instead of stat. I've been using it for the past few
> >> days and it seems to work rather well.
> >>
> >> One thing I'm not sure about is whether it works with NFS, so it could
> >> use some more testing. If you'd like to test it, replace
> >> /usr/ports/x11/kdelibs4/files/patch-kio-kio-kdirwatch.cpp with the
> >> attached patch and reinstall kdelibs.
> >
> > I tried this patch with KDE 4.4.4 and 4.4.5 on FreeBSD 8.0/i386 and
> > plasma-desktop crashes every time I try to open a file through dolphin
> > that I haven't used recently. If I run plasma-desktop in the
> > foreground I get many lines like this when I open a file:
> >
> > QFileSystemWatcher: failed to add paths:
> > /usr/home/Jason/.kde4/share/apps/RecentDocuments QFileSystemWatcher:
> > failed to add paths: /usr/home/Jason/.kde4/share/apps/RecentDocuments
> > QFileSystemWatcher: failed to add paths:
> > /usr/home/Jason/.kde4/share/apps/RecentDocuments QFileSystemWatcher:
> > failed to add paths: /usr/home/Jason/.kde4/share/apps/RecentDocuments
> > QFileSystemWatcher: failed to add paths:
> > /usr/home/Jason/.kde4/share/apps/RecentDocuments QFileSystemWatcher:
> > failed to add paths: /usr/home/Jason/.kde4/share/apps/RecentDocuments
> > QFileSystemWatcher: failed to add paths:
> > /usr/home/Jason/.kde4/share/apps/RecentDocuments Illegal instruction: 4
> > (core dumped)
>
> Could you give the attached patch a try? It replaces the previous
> patch.
That seems to have solved the issue I was having. Thank you! :-)
-Jason
More information about the kde-freebsd
mailing list