Re: Performance



On Mon, 2003-11-10 at 11:37, Xavier Bestel wrote:
> Le lun 10/11/2003 à 11:03, Julien Olivier a écrit :
> > A better proposition though: why not do determine MIME types using
> > extensions if (and only if) the number of files in the folder exceeds a
> > certain value ?
> 
> Why not maintain a cache of mime-types, for all non-recently modified
> files ? Certainly would speedup things a lots on big $HOME and such.

I don't like caches like this. They use a lot of memory that might not
be needed, and there can be all sorts of problems if the cache go stale
and contain invalid data. Keeping the cache not invalid often takes as
much time as what you were trying to avoid doing by cacheing.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a jaded skateboarding Green Beret possessed of the uncanny powers of an 
insect. She's a manipulative out-of-work fairy princess who dreams of becoming 
Elvis. They fight crime! 




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