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

Re: Binary pkg cache (WAS: Re: Debian vs Red Hat??? I need info.)

On Wed, May 24, 2000 at 03:03:49PM -0700, Joey Hess wrote:
> Anyway, I don't belive apt has to read in all the file list data,
> which seems to be the bulk of dpkg's memory use. That data is only of
> use if you are actually adding/removing files and have to check for
> files that are both in the same packages, something apt is unaware of.

hmmmm. i suppose the only other really viable way of doing that is for
dpkg to construct a hashed db (LHS = filename, RHS = package name),
rebuilding it from scratch for each run....and then doing a quick lookup
for each filename as needed.

now doing a disk lookup to a hashed db file is definitely slower than
doing an in-memory lookup....but the memory savings would mean that dpkg
doesn't have to swap anywhere near as much when it does other things
(like decompress and install packages, run {pre,post}{inst,rm} scripts,

on a small memory system, it would probably be a big win. on a machine
with lots of memory, it would probably be a big loss (or maybe not - a
machine with lots of memory would cache the .db file and would only be a
little slower as a result).

just some ideas.  i don't know dpkg's internals well enough to really

btw, another issue to consider here is that sleepycat's db libs aren't
GPL...but GNU gdbm is.


craig sanders

Reply to: