Re: Patch: fix 100% cpu when mime-info files are updated



Hey,
	Okay, that sounds good to me.

	(That's the second release-team approval)

Good Luck,
Mark.

On Tue, 2003-09-02 at 12:15, Alexander Larsson wrote:
> On Tue, 2003-09-02 at 13:45, Mark McLoughlin wrote:
> > Hi,
> > 
> > On Tue, 2003-09-02 at 10:00, Frederic Crozat wrote:
> > > The following patch fixes 100% cpu usage in nautilus (and probably other
> > > apps) when mime-info files are modified. To trigger it, simply run
> > > "touch /usr/share/mime-info/*" and see nautilus (and maybe your desktop)
> > > frozen for a long time :)) This bug has been here since GNOME 2.2 :((
> > > 
> > > http://qa.mandrakesoft.com/show_bug.cgi?id=2457
> > > 
> > > Since I'm the patch author, I can't give my r-t approval on it :)
> > > 
> > > Patch was reviewed by Alex.
> > 
> > 	I have to say I'm a little worried about a patch like this going in at
> > this stage. It looks potentially risky - changing (even slightly) the
> > behaviour/semantics of gnome-vfs this close to the release.
> 
> The only user of this I found in my tree is gnome-settings-daemon and
> nautilus. Both users want this fix and seem safe with the change.
> 
> > 	Also, I don't really understand why this fixes the bug and why we're
> > adding the timeout to gnome-vfs rather than Nautilus.
> 
> The core problem is that the way things are set up a change of mime data
> ends up with a whole bunch of mime db data_changed emissions. Some of
> these are from internally in the library, and some from fam change
> events for every write of the files. Since nautilus does a fair amount
> of work for each mime data change doing this work many times is really
> expensive. The patch just delays emission for a short while so the
> change events can be combined into just one.
> 
> The initial patch frederic wrote was for nautilus, but that patch had a
> much higher complexity due to the fact that nautilus uses this signal in
> several places and for several objects which lead to memory management
> issues. Putting the fix in gnome-vfs makes it much cleaner, plus it
> fixes the problem for all applications using gnome-vfs.
> 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>  Alexander Larsson                                            Red Hat, Inc 
>                    alexl redhat com    alla lysator liu se 
> He's an uncontrollable zombie librarian on the edge. She's a mentally unstable 
> mutant bodyguard with a knack for trouble. They fight crime! 




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