[Nautilus-list] Re: nautilus & signals ...



On 9 Apr 2002, Michael Meeks wrote:

> 
> 	Having seen that g_signal_emitv & pthread lock / unlock are top of the
> profile, I had a little poke around and discovered that the
> nautilus-icon-container was used pretty much exclusively by connecting
> to a load of signals for all manner of things such as comparing files
> for sorting. I pruned some of the most used signals and altered the
> signal profile from:
> 
>     875	NautilusIconContainer::get-stored-icon-position
>     875	NautilusIconContainer::icon-added
>     961	GtkAccelLabel::parent-set
>     963	GtkAccelLabel::hierarchy-changed
>    1823	NautilusIconContainer::get-icon-images
>    1823	NautilusIconContainer::get-icon-text
>    2346	NautilusIconCanvasItem::bounds-changed
>    5329	GtkAccelLabel::notify
>    5469	NautilusIconCanvasItem::notify
>   10035	NautilusIconContainer::compare-icons
> 
> 	to:
> 
>     640 GtkMenuItem::notify
>     797 GtkLabel::style-set
>     808 GtkImageMenuItem::add
>     922 NautilusIconCanvasItem::destroy
>     954 GtkAccelLabel::show
>    1086 GtkImageMenuItem::notify
>    1140 NautilusVFSFile::destroy
>    1390 GtkAccelLabel::destroy
>    1478 GtkImage::notify
>    1717 GtkLabel::notify
>    2061 GtkAccelLabel::parent-set
>    2063 GtkAccelLabel::hierarchy-changed
>    3201 NautilusIconCanvasItem::notify
>    9750 GtkAccelLabel::notify
> 
> 	Although these results are broadly incomparable, since they're for
> different periods :-) either way - it seems clear that we win a lot by a
> large signal emission reduction ( and commensurate locking penalties ),
> but it's also clear that the 'notify' business is very painful indeed.

Nice. But its sad that we have to fuck around with our design because 
GSignal is so slow. And it seems tim has almost stopped working on it, 
which is bad because he claimed to have lots of optimizations in store.

> 	It looks like a lot of that is in the UI handler, but quite why / where
> is somewhat of a mystery to me, since we only have:
> 
>       1	BonoboUIXml::reinstate
>      29	BonoboUIXml::override
>     101	BonoboUIXml::remove
>     220	BonoboUIXml::replace-override
> 
> 	Anyway; hopefully that'll give a speed win / make other things more
> apparent, appearances are so deceptive when it's that fast already.

We shouldn't be complaining to loudly over it being fast already. :)

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a sword-wielding voodoo senator with a robot buddy named Sparky. She's a 
ditzy winged angel who inherited a spooky stately manor from her late maiden 
aunt. They fight crime! 





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