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

Re: dpkg --smallmem has a larger footprint than --largemem

On Sun, Jan 14, 2001 at 09:14:31PM +0000, Ian Jackson wrote:
> There are lots of reliability issues with that.  A better solution
> (which I've thought for some time would be a good idea) would be to
> have the file lists for several packages together in one .list file
> (or equivalent); last time I looked most of the time spent during
> startup is not in accessing and building the in-core database, but
> simply opening and reading all those thousands of small files.

Simply calling stat() on all those files is a real performance jerk.
Which leads to my question. If we open the file, and then try to read
from it (all the files in /var/lib/dpkg/info/ that is), is it really
necessary to stat the file? I mean isn't all we are interested in is
"open it, see if it fails...read from it, see if that fails". If those
two things succeed, what does it matter if we can stat it or not?

If it's just to get the st_size, then I think we just need to find a
better way :)

/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '

Reply to: