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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BCD1B158094 for ; Sun, 25 Sep 2022 18:26:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 30BDB2BC0DA; Sun, 25 Sep 2022 18:23:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F09C02BC0D7 for ; Sun, 25 Sep 2022 18:23:35 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: Sam James Subject: [gentoo-dev] [PATCH 12/15] unpacker.eclass: decompress xz in parallel Date: Sun, 25 Sep 2022 20:23:14 +0200 Message-Id: <20220925182317.1559529-13-mgorny@gentoo.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220925182317.1559529-1-mgorny@gentoo.org> References: <20220925182317.1559529-1-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: cfb9b17e-da3b-47a9-97b8-65f4352a395f X-Archives-Hash: 7f713a960178d18c8ba41e6c769b9488 From: Sam James >= xz 5.3.3_alpha supports parallel decompression, so let's use it. As recently added to Portage (see https://github.com/gentoo/portage/commit/48d107e5c1a103d59a053aebeefa9a5aac5c32ff). Signed-off-by: Sam James --- eclass/unpacker.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass index 70a46ac19709..d96b56609869 100644 --- a/eclass/unpacker.eclass +++ b/eclass/unpacker.eclass @@ -23,7 +23,7 @@ esac if [[ -z ${_UNPACKER_ECLASS} ]]; then _UNPACKER_ECLASS=1 -inherit toolchain-funcs +inherit multiprocessing toolchain-funcs # @ECLASS_VARIABLE: UNPACKER_BZ2 # @USER_VARIABLE @@ -395,7 +395,7 @@ _unpacker_get_decompressor() { *.z|*.gz|*.tgz) echo "gzip -dc" ;; *.lzma|*.xz|*.txz) - echo "xz -dc" ;; + echo "xz -T$(makeopts_jobs) -dc" ;; *.lz) : ${UNPACKER_LZIP:=$(type -P plzip || type -P pdlzip || type -P lzip)} echo "${UNPACKER_LZIP} -dc" ;; -- 2.37.3