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

Re: debian-trivia



On Mon, 2003-01-06 at 06:32, Marius Gedminas wrote:
> > - Rather than storing data for each and every package in the single file
> > '/var/lib/dpkg/{status,available}', store each package's data in its own
> > file '/var/lib/dpkg/{status,available}/foo'.
> 
> IMHO that would be *less* efficient.  Ever noticed how long it takes to
> ls /var/lib/dpkg/info?  Ext2/3 does not cope well with lots of small
> files in a big directory.

Does it take a long time? I don't think I've ever tried that on a slow
machine, and I don't have one handy to try it on. Anyway, it's better
than having to parse a huge file just to fetch a couple of control
fields for one package. If that's not a good idea, then perhaps the
control data should be cached as well as file lists. Then you don't have
to parse it, really.

> > - Store a database of files on the filesystem and the packages they
> > belong to in a cache, like above.
> 
> I believe dlocate does something like this.

Something like that, yes. Actually, now that you mention it, dlocate
would be quite obsolete if these optimizations were implemented...

Alex.

-- 
PGP Public Key: http://aoi.dyndns.org/~alex/pgp-public-key

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s:++ a18 C++(++++)>$ UL+++(++++) P--- L+++>++++ E---- W+(+++) N-
o-- K+ w--- !O M(+) V-- PS+++ PE-- Y+ PGP+(+++) t* 5-- X-- R tv b- DI
D+++ G e h! !r y
------END GEEK CODE BLOCK------

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: