[Bug 446431] [NEW] unlzma is 4 times slower than gunzip

Jérôme jerome.bouat at wanadoo.fr
Thu Oct 8 15:32:51 UTC 2009


Public bug reported:

Binary package hint: lzma

I made a test with the font file
/usr/share/fonts/X11/misc/18x18ko.pcf.gz

The compression ration is better with lzma than gzip as expected:
-----
j at j-desktop:~$ cp /usr/share/fonts/X11/misc/18x18ko.pcf.gz .
j at j-desktop:~$ gunzip 18x18ko.pcf.gz
j at j-desktop:~$ gzip --best -c 18x18ko.pcf > 18x18ko.pcf.gz
j at j-desktop:~$ lzma --best -c 18x18ko.pcf > 18x18ko.pcf.lzma
j at j-desktop:~$ du 18x18ko.pcf*
2924    18x18ko.pcf
716     18x18ko.pcf.gz
376     18x18ko.pcf.lzma
j at j-desktop:~$
-----

However the lzma decompression seems more than 4 times slowerfor the same uncompressed original file:
-----
j at j-desktop:~$ time { for i in {0..999}; do gunzip -c 18x18ko.pcf.gz > /dev/null ; done }

real    0m38.506s
user    0m35.130s
sys     0m3.300s
j at j-desktop:~$ time { for i in {0..999}; do unlzma -c 18x18ko.pcf.lzma > /dev/null ; done }

real    2m48.090s
user    2m35.814s
sys     0m8.945s
j at j-desktop:~$
-----

I don't understand why there is so much difference since the
decompression algorithm is quite the same.

ProblemType: Bug
Architecture: amd64
Date: Thu Oct  8 17:13:37 2009
Dependencies:
 libgcc1 1:4.2.4-1ubuntu4 [modified: lib/libgcc_s.so.1]
 libstdc++6 4.2.4-1ubuntu4 [modified: usr/lib/libstdc++.so.6.0.9]
 gcc-4.2-base 4.2.4-1ubuntu4
 libc6 2.7-10ubuntu5 [modified: lib/ld-2.7.so lib/libc-2.7.so lib/libcrypt-2.7.so lib/libdl-2.7.so lib/libm-2.7.so lib/libnsl-2.7.so lib/libpthread-2.7.so lib/libresolv-2.7.so lib/librt-2.7.so lib/libthread_db-1.0.so lib/libutil-2.7.so usr/lib/pt_chown usr/bin/iconv usr/bin/getent usr/bin/getconf usr/bin/zdump usr/bin/rpcinfo usr/sbin/zic usr/sbin/iconvconfig]
DistroRelease: Ubuntu 8.04
NonfreeKernelModules: nvidia
Package: lzma 4.43-12ubuntu1 [modified: usr/bin/lzma usr/bin/lzma_alone]
PackageArchitecture: amd64
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: lzma
Uname: Linux 2.6.24-24-generic x86_64

** Affects: lzma (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug

-- 
unlzma is 4 times slower than gunzip
https://bugs.launchpad.net/bugs/446431
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list