unlzma and unxz should be specific binaries instead of links

Bug #981434 reported by Jérôme
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xz-utils (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Most users use only decompression tools and rarely compression tools.

I think it would lower the load time (especially cold startup) as well as the argument parsing time if the uncompression tools would be specific binaries. Moreover, it could slightly decrease the memory consumption.

For example, 'gunzip' is a specific binary which have only 2% of the size of the 'gzip' generic binary :
-----
j@dt-X64:~/tmp$ ls -l /bin/gzip /bin/gunzip
-rwxr-xr-x 1 root root 2251 févr. 9 01:26 /bin/gunzip
-rwxr-xr-x 1 root root 92720 févr. 9 01:26 /bin/gzip
j@dt-X64:~/tmp$
-----

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: xz-lzma 5.1.1alpha+20110809-3
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic x86_64
ApportVersion: 2.0.1-0ubuntu2
Architecture: amd64
Date: Sat Apr 14 10:13:58 2012
InstallationMedia: Xubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120328)
PackageArchitecture: all
SourcePackage: xz-utils
UpgradeStatus: No upgrade log present (probably fresh install)

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

Try `less $(which gunzip)`. It's a shell script that calls `gzip`.

Revision history for this message
Thorsten Glaser (mirabilos) wrote :

Huh, that’s new. Since when?

Anyway, a hardlink (or symbolic link) of gunzip to gzip also just works, and is what I’m used to from Unix.

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

Then a specific binary for decompression would save resources. The common parts could be gathered in a shared library.

Most of the time, the compression binary would never be used.

Revision history for this message
Thorsten Glaser (mirabilos) wrote :

Actually, putting it into an shlib will be a net loss.

Rather take the full library, compression and decompression, link it statically, and hardlink the compressor and decompressor binaries. That‘d save more.

cf. http://aiju.de/rant/dynamic-linking (thanks cnuke@ for the link)

Revision history for this message
Rolf Leggewie (r0lf) wrote :

The purported resource savings haven't been substantiated and most likely won't make any difference. This would be something that upstream would need to change, not Ubuntu as the packaging distro.

Changed in xz-utils (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.