Re: To Discuss: Application Startup Time

On Thu, 2004-04-01 at 16:52, Andy Ross wrote:
> Alexander Larsson wrote:
> > Ah, yeah. It stats each directory, but not each icon. However,
> > it seems that the amount of directories have gotten quite
> > large.
> I honestly thought that getdents() *did* have to read the inodes
> for all the files, at least on ext2/3.  Where else could the
> d_type field come from?  I remember reading a flame war to this
> effect at some point a few years ago; I don't remember where.

Sure doesn't look that way in ext2_readdir() and ext3_readdir().

> Regardless, the problem and fix remain the same.  Typical gnome
> apps need to load only a tiny fraction of the icon files in a
> theme, so building an in-memory cache of all the files is a
> needless waste.

However, having an in-memory cache of at least the used icons is very
important for performance of icon intensive apps, and lazy population
has its drawbacks. For instance, for cache-misses you have to actually
stat all the files, since you can't know that the file doesn't exist if
its not in the in-memory cache. And cache-misses are very common for
mime-type icon lookups, and we have to stat in a lot of directories when
looking for files.

I guess if we use lazy caching with caching of negative lookups that
might work. I think its gonna make startup for icon intensive apps a lot
slower though. Basically i think this needs some experimenting and

 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an all-American Catholic cyborg from the Mississippi delta. She's a 
plucky extravagent doctor looking for love in all the wrong places. They fight 

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