Re: gnome-icon_loader ...



Michael Meeks <michael ximian com> writes:

> Hi there,
> 
> 	One of the largest single method performance hits on nautilus startup,
> seems to be in the icon loader, inasmuch that in load_themes it stats
> every icon in the pixmaps directory.
> 
> 	Why do we need to do this at startup instead of doing it idly ? 

I know there used to be big problems where, to find an icon,
it would look in:

 a/c.PNG
 a/c.png
 a/c.SVG
 a/c.svg
 b/c.PNG
 b/c.png
 b/c.SVG
 b/c.svg
 ....

It would check all the _possible_ names (taking into account extensions,
and various other possible differences in what icon was used); turning that 
around and simply checking what icons were there looked a whole lot
faster. I can't imagine that an effective 'ls -l' on the current theme
would take any significant amount of time. (I suppose maybe the
stats could be done lazily and only the readdir on startup, if it
was a problem...?)

All speculation without looking at the code.

                                        Owen



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