Re: Beagle CPU usage (was Proposed module: tracker)

El vie, 12-01-2007 a las 12:16 -0500, Joe Shaw escribi�> Beagle has unfortunately gotten a reputation for being CPU hungry
> because certain documents trigger bugs.  I've spent a lot of my time
> recently fixing such issues and making it easier to identify and debug
> them.  There's no reason why Beagle needs to be CPU heavy, and it hasn't
> been designed as such (in fact, quite the contrary).

This reminds me... a few weeks ago we had a bug where even looking at a
folder which contained a certain PowerPoint file would peg the CPU and
eat all available RAM.  This is because 

1. Nautilus wants a thumbnail for the .ppt
2. libgnomeui runs gst-office-thumbnailer
3. which extracts a Windows Metafile from the .ppt
4. then it uses convert(1) from ImageMagick to render the WMF into a PNG

and convert(1) is rather buggy for some WMFs.

We put a call to setrlimit() in gst-office-thumbnailer, so that the
helper convert(1) process is limited to 256 MB of memory and 5 seconds
of CPU time.  Some files do *not* get thumbnailed, of course, but this
is better than making the machine unusable.

I don't know if Beagle already has such limits for helper processes; in
any case it may be a good idea to have them.  We should actually have
more of those safety valves in scary places like that.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]