(Sorry, don't have a patch for this yet, I'll generate a combined one later today, after I wake up).
In dpkg-deb/extract.c, there is a copy loop, that reads data from the .deb ar, and writes it to a pipe(this is done inside a fork). This copy loop was doing it one byte at a time! I also have dpkg-deb using zlib(I compile statically, so no external dependencies). This also gave a speedup. Extraction of 13m tetex-base, after the deb was in the disk cache. dpkg-deb version | time -----------------------+------------- unmodified | 9.843s 4k buffer | 7.581 16k buffer | 7.482 mini-gunzip | 8.925 4k buffer+mini-gunzip | 7.300 16k buffer+mini-gunzip | 6.439 ----BEGIN GEEK CODE BLOCK---- Version: 3.12 GCS d- s: a-- c+++ UL++++ P+ L++++ !E W+ M o+ K- W--- !O M- !V PS-- PE++ Y+ PGP++ t* 5++ X+ tv b+ D++ G e h*! !r z? -----END GEEK CODE BLOCK----- ----BEGIN PGP INFO---- Adam Heath <[EMAIL PROTECTED]> Finger Print | KeyID 67 01 42 93 CA 37 FB 1E 63 C9 80 1D 08 CF 84 0A | DE656B05 PGP AD46 C888 F587 F8A3 A6DA 3261 8A2C 7DC2 8BD4 A489 | 8BD4A489 GPG -----END PGP INFO-----

