RE: Nautilus, metadata and extendet attributes



Le jeu 29/01/2004 à 21:00, Manuel Amador (Rudd-O) a écrit :
> Reading EAs, while not as fast as simply reading a directory listing,
> would be much faster than opening each file sequentially.  The reason
> for this is that:
> 
> 1) there is a higher probability of EAs being cached on memory than the
> file contents
> 2) the usage of EAs makes new things possible
> 3) the byte size of EA contents would be a tiny fraction (orders of
> magnitude less) than of the files they describe

Ah well ... not really:
1) Only the first read matters, otherwise nautilus (or something else)
will cache the mime-type (or the first bytes) by itself anyway. Just try
opening nautilus for the first time on a crowded directory, then close
and reopen it. Feel the difference. So no point here.
2) Uh ?
3) When you read one single byte on disk, you in fact read a bunch of
them (how many exactly depends on the drive, driver, etc.). Moreover,
the cost of seeking to this byte is so high that the "system" will read
a bunch more sectors (many many bytes) just in case they're needed
later. No point there too.

> Once you've determined the file type and stored it in an EA, subsequent
> reads would be faster than sniffing the files, for all the
> aforementioned reasons.





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