I have two ftp.$LANG_CODE.debian.org unstable mirrors in my
/etc/apt/sources.list, because sometimes one of them might be down or
out-of-date.

Doing an "apt-file search aoeui" on my fast (modern 8-core Sandy
Bridge) computer takes around 4 seconds. Almost all of this time is
spent gunzipping the file lists.

I believe merely using lzop could give a 2-4x speedup:

------------------------------------------------------------
$ time gzip -d <ftp.fi.debian.org_debian_dists_unstable_Contents-amd64.gz 
>/dev/null 

real    0m1.608s
user    0m1.584s
sys     0m0.016s

$ time lzop -d <ftp.fi.debian.org_debian_dists_unstable_Contents-amd64.lzo 
>/dev/null 

real    0m0.382s
user    0m0.356s
sys     0m0.024s
------------------------------------------------------------

IOW gzip -d takes 4.4 times longer than lzop -d. The price for this is
an 1.7x increase in the size of the compressed file:

-rw-r--r-- 1 sliedes sliedes 19892895 Jul  2 14:21 
ftp.fi.debian.org_debian_dists_unstable_Contents-amd64.gz
-rw-r--r-- 1 sliedes sliedes 34062072 Jul  2 14:23 
ftp.fi.debian.org_debian_dists_unstable_Contents-amd64.lzo

Decompressing a gzip -1 compressed file still takes 3.3x the time of
lzop -d:

------------------------------------------------------------
$ time gunzip -d 
<gzip-1/ftp.fi.debian.org_debian_dists_unstable_Contents-amd64.gz >/dev/null 

real    0m1.199s
user    0m1.164s
sys     0m0.012s
------------------------------------------------------------

        Sami

Attachment: signature.asc
Description: Digital signature

Reply via email to