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

Re: debian-trivia



On Mon, 2003-01-06 at 11:52, criggie wrote:
> On 06 Jan 2003 06:02:58 -0800
> "Alexander Hvostov" <alex@aoi.dyndns.org> wrote:
> > Perhaps it's high time dpkg received some serious optimization. The
> > way in which the package control info is stored and processed is
> > horribly inefficient. Here's some suggestions:
> 
> > - 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'.
> 
> How about a compiled database file, with an index?  Its not my field but
> could read/parsing a text file be the main source of the slowness?

Well, my suggestion was mostly to help with when you need to read the
control fields of only one package. Parsing the control for _all_ of
them would be a waste in that situation.

A database file is probably a better solution, though. The text format
is HUGE, and parsing it takes a very long time when you have that much
data to contend with. A nicely compact database file needing a minimum
of parsing would be much better. Of course, it would need to be just a
cache, with a text file as the master copy; if the text file changes,
the cache must be regenerated. Then you don't lose the ability to
hand-edit control data when necessary (and when using unstable, it is
occasionally necessary).

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: