unlzma is 4 times slower than gunzip

Bug #446431 reported by Jérôme on 2009-10-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lzma (Ubuntu)

Bug Description

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@j-desktop:~$ cp /usr/share/fonts/X11/misc/18x18ko.pcf.gz .
j@j-desktop:~$ gunzip 18x18ko.pcf.gz
j@j-desktop:~$ gzip --best -c 18x18ko.pcf > 18x18ko.pcf.gz
j@j-desktop:~$ lzma --best -c 18x18ko.pcf > 18x18ko.pcf.lzma
j@j-desktop:~$ du 18x18ko.pcf*
2924 18x18ko.pcf
716 18x18ko.pcf.gz
376 18x18ko.pcf.lzma

However the lzma decompression seems more than 4 times slowerfor the same uncompressed original file:
j@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@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

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
 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
SourcePackage: lzma
Uname: Linux 2.6.24-24-generic x86_64

Revision history for this message
Jérôme (jerome-bouat) wrote :

I wonder if it is related to that but the Tomshardware.com site found that (un)7zip was slower that (un)zip too:


To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers