On Fri, 30 Mar 2001, Joey Hess wrote: > I've been running (testing's) dpkg on a low memory 486/33 a lot lately. > Poor me. Anyway, it seems to take dpkg about 5 minutes to print > *anything*, then in relatively short order, it reads the database, and > is off to installing the package. > > I straced it during the mysterious pause, and find it is reading what > looks like the available file, one 16k block at a time, with each block > taking almost 1 second to read on my 486. > > It's a 486, but it shouldn't be that slow. Is this a known performance > problem, or should I look into it?
Please try dpkg from cvs. What you are seeing is dpkg using libc's getc() function, which has an internal buffer of 16k. In cvs, I read the entire file at once into a buffer of the right size, or I mmap it(defaults to the former, and is only changable with a #define). The speedup on my dual-celeron 333 was 20-35%. I can see slower machines getting a bigger boost.

