summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-03-03 10:51:11 +0100
committerJim Meyering <meyering@redhat.com>2012-03-03 11:13:59 +0100
commit4b2224681fbc297bf585630b679d8540a02b78d3 (patch)
tree9504b8ea5422979c8f7ed0a4822fdd6ec6d3e109
parent3db1e8238af7201b991c34dd51e156b852be3304 (diff)
downloadgrep-4b2224681fbc297bf585630b679d8540a02b78d3.tar.gz
maint: use an optimal-for-grep xz compression setting
* cfg.mk (XZ_OPT): Use -6e (determined empirically, see comments). This sacrifices a meager 60 bytes of compressed tarball size for a 55-MiB decrease in the memory required during decompression. I.e., using -9e would shave off only 60 bytes from the tar.xz file, yet would force every decompression process to use 55 MiB more memory.
-rw-r--r--cfg.mk20
1 files changed, 20 insertions, 0 deletions
diff --git a/cfg.mk b/cfg.mk
index 08bb156e..84115c20 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -31,6 +31,26 @@ bootstrap-tools = autoconf,automake,gnulib
# Now that we have better tests, make this the default.
export VERBOSE = yes
+# Comparing tarball sizes compressed using different xz presets, we see
+# that -6e adds only 60 bytes to the size of the tarball, yet reduces
+# (from -9) the decompression memory requirement from 64 MiB to 9 MiB.
+# Don't be tempted by -5e, since -6 and -5 use the same dictionary size.
+# $ for i in {4,5,6,7,8,9}{e,}; do \
+# (n=$(xz -$i < grep-2.11.tar|wc -c);echo $n $i) & done |sort -nr
+# 1236632 4
+# 1162564 5
+# 1140988 4e
+# 1139620 6
+# 1139480 7
+# 1139480 8
+# 1139480 9
+# 1129552 5e
+# 1127616 6e
+# 1127556 7e
+# 1127556 8e
+# 1127556 9e
+export XZ_OPT = -6e
+
old_NEWS_hash = 347e90ee0ec0489707df139ca3539934
# Many m4 macros names once began with `jm_'.