summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-03-03 09:41:31 +0100
committerJim Meyering <meyering@redhat.com>2012-03-07 21:08:26 +0100
commitc1d07237a82a9eeebb6911c1ebb63957dac0c148 (patch)
treea162b8f367959c0b4fae6300b1407abfe5315c8b
parenta3eb71a98fd195e52d335fb8d6bdc2a719cc2c88 (diff)
downloadcoreutils-c1d07237a82a9eeebb6911c1ebb63957dac0c148.tar.xz
maint: use an optimal-for-coreutils xz compression setting
* cfg.mk: Set XZ_OPT = -8e (determined empirically). This sacrifices 8 KiB of compressed tarball size for a 32-MiB decrease in the memory required during decompression. I.e., using -9e would shave off only 8 KiB from the tar.xz file, yet would force every decompression process to use 32 MiB more memory.
-rw-r--r--cfg.mk14
1 files changed, 14 insertions, 0 deletions
diff --git a/cfg.mk b/cfg.mk
index b4bd22281..a5d129eb6 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -31,6 +31,20 @@ bootstrap-tools = autoconf,automake,gnulib,bison
# Now that we have better tests, make this the default.
export VERBOSE = yes
+# Comparing tarball sizes compressed using different xz presets, we see that
+# an -8e-compressed tarball is only 9KiB larger than the -9e-compressed one.
+# Using -8e is preferred, since that lets the decompression process use half
+# the memory (32MiB rather than 64MiB).
+# $ for i in {7,8,9}{e,}; do \
+# (n=$(xz -$i < coreutils-8.15*.tar|wc -c);echo $n $i) & done |sort -nr
+# 5129388 7
+# 5036524 7e
+# 5017476 8
+# 5010604 9
+# 4923016 8e
+# 4914152 9e
+export XZ_OPT = -8e
+
old_NEWS_hash = c2d954b7c19745272321cc4c4b676993
# Add an exemption for sc_makefile_at_at_check.