From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9EC7F158020 for ; Fri, 21 Oct 2022 02:34:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 820A3E07E6; Fri, 21 Oct 2022 02:34:24 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 611F5E07E6 for ; Fri, 21 Oct 2022 02:34:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 76235340FEB for ; Fri, 21 Oct 2022 02:34:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0D4AD624 for ; Fri, 21 Oct 2022 02:34:22 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1666315937.6834e464803b5ac98f8ab1bbca5379970b5bc6d9.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ecompress X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 6834e464803b5ac98f8ab1bbca5379970b5bc6d9 X-VCS-Branch: master Date: Fri, 21 Oct 2022 02:34:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 83a54e1d-dfae-4167-a021-c11b18952e1b X-Archives-Hash: f576ec08f6455f98e3911dce43cbe8e5 commit: 6834e464803b5ac98f8ab1bbca5379970b5bc6d9 Author: Sam James gentoo org> AuthorDate: Fri Oct 21 01:32:17 2022 +0000 Commit: Sam James gentoo org> CommitDate: Fri Oct 21 01:32:17 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=6834e464 ecompress: don't set -9 for xz >From xz(1): """ The differences between the presets are more significant than with gzip(1) and bzip2(1). The selected compression settings determine the memory requirements of the decompressor, thus us‐ ing a too high preset level might make it painful to decompress the file on an old system with little RAM. Specifically, it's not a good idea to blindly use -9 for everything like it of‐ ten is with gzip(1) and bzip2(1). [...] -7 ... -9 These are like -6 but with higher compressor and decompressor memory requirements. These are useful only when compressing files bigger than 8 MiB, 16 MiB, and 32 MiB, respectively. [...] • DictSize is the LZMA2 dictionary size. It is waste of memory to use a dictionary bigger than the size of the uncompressed file. This is why it is good to avoid using the presets -7 ... -9 when there's no real need for them. At -6 and lower, the amount of memory wasted is usually low enough to not matter. """ Most things that ecompress touches are tiny (<32MB certainly). I made the mistake the man page warngs about -- don't assume it's a good idea just because of gzip & bzip2, and that's exactly what I did! Signed-off-by: Sam James gentoo.org> bin/ecompress | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ecompress b/bin/ecompress index 78a53ccac..609814cca 100755 --- a/bin/ecompress +++ b/bin/ecompress @@ -128,7 +128,7 @@ if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then # See: https://bugs.gentoo.org/672916 # Setting '--rm' will remove the source files after a successful compression. lz4) PORTAGE_COMPRESS_FLAGS="-m --rm";; - xz) PORTAGE_COMPRESS_FLAGS="-9 -T$(___makeopts_jobs) --memlimit-compress=50% -q";; + xz) PORTAGE_COMPRESS_FLAGS="-q -T$(___makeopts_jobs) --memlimit-compress=50%";; zstd) PORTAGE_COMPRESS_FLAGS="-q --rm -T$(___makeopts_jobs)";; esac fi