From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id XPQqLoE6Zl/vJwAA0tVLHw (envelope-from ) for ; Sat, 19 Sep 2020 17:06:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id ePeTKYE6Zl+QAwAAbx9fmQ (envelope-from ) for ; Sat, 19 Sep 2020 17:06:09 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 46A819402A0 for ; Sat, 19 Sep 2020 17:06:09 +0000 (UTC) Received: from localhost ([::1]:57722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJgJM-0003K4-6J for larch@yhetil.org; Sat, 19 Sep 2020 13:06:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJgHK-0002Kp-Rh for guix-patches@gnu.org; Sat, 19 Sep 2020 13:04:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36421) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kJgHK-0006yq-Hk for guix-patches@gnu.org; Sat, 19 Sep 2020 13:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kJgHK-0005QW-DK for guix-patches@gnu.org; Sat, 19 Sep 2020 13:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43516] [PATCH core-updates] packages: Enable multi-threaded xz compression when repacking source. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 19 Sep 2020 17:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43516 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43516@debbugs.gnu.org Cc: Maxim Cournoyer X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160053501220821 (code B ref -1); Sat, 19 Sep 2020 17:04:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Sep 2020 17:03:32 +0000 Received: from localhost ([127.0.0.1]:47967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJgGq-0005Pl-5y for submit@debbugs.gnu.org; Sat, 19 Sep 2020 13:03:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:50320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJgGo-0005Pd-1A for submit@debbugs.gnu.org; Sat, 19 Sep 2020 13:03:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJgGk-00029u-F5 for guix-patches@gnu.org; Sat, 19 Sep 2020 13:03:28 -0400 Received: from mail-qv1-xf32.google.com ([2607:f8b0:4864:20::f32]:46723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kJgGi-0006wU-HY for guix-patches@gnu.org; Sat, 19 Sep 2020 13:03:26 -0400 Received: by mail-qv1-xf32.google.com with SMTP id di5so4902296qvb.13 for ; Sat, 19 Sep 2020 10:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NcsRjvOuO1KQTPvHiHn1cy8NuXQNhh3gNlgwMMwplT4=; b=OCqe5CNd0BIJhIl2MezI1wArs4AmZxuzfBB5laEaKlDRVFcnYpFvssw3TEe+dIle9s ijD7RwFn7itK+/0kFRvtb6lTuOPuWGlRoTWFpY7P4lpV+fJ/Q8ljIi4yTk1TjLMZ0j+B kQzF5o48t4HscGKq+XhJQYGKN2lxZ5OCgynAu8hcVZFqEMPlU+HAJoZ3Pie9MnqJq+8W zGQ0YtDKPZ75ayRFQX8qkv1EXStu2VcgcAYxyVhph3udaSJWMwwOLek8y+xKuALJPeSB WtgQjBJy2EKgVa2UhzxkYRSeJmjuu7J9tqPv1FBd7/uKb6jBDukvoCqIPujH9Ap6uDy2 WKCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NcsRjvOuO1KQTPvHiHn1cy8NuXQNhh3gNlgwMMwplT4=; b=sgQSzIwAR2fRjh6Q8BkKpZrzTe29Yhb5jEBlh0jfVzo3qI68YmtTj66jnErfkbweSA 2N8Au+2U5Ui7BzBE9Wzhoc+YjyMwl6Xj/uHaDRaJues83R1/Hl0JqVG/voMBLopHI6A4 tBw5nXf5ykBOMW3ZYxhN2GNzRztXn/TM3u+DQA+oyFqVWS/5u+jjasz8ktNWkiBLlDPu wAE6r2ZuSBbhnJN26v6dZsvWsHtxvPYykRZnHi5/L+Cp1O0zSVpEaVxChY1dAGYD1IDx sCG+oSXLz8Nf58F0G2GAg2E/G5nTg07zch4bTHCf7T8WsY/ymWUDOoflocEaezNBXDwM B3eA== X-Gm-Message-State: AOAM533S9a6tpUyCQ3LKhvDFjbyemOcrnvEQHP7ZpYup+f7vA4gwhRmK 4h9Y4dxmceLAENHfN4qmK8oO8GSVFOs= X-Google-Smtp-Source: ABdhPJxW81f6GpGRW1EfN60zV57ZM/2/ecY9Ho4NcDuvvSLI6i5dZzUuBtGd2RN64l3Kn03CTJJdsg== X-Received: by 2002:a0c:e991:: with SMTP id z17mr23025435qvn.39.1600535003437; Sat, 19 Sep 2020 10:03:23 -0700 (PDT) Received: from localhost.localdomain (dsl-159-128.b2b2c.ca. [66.158.159.128]) by smtp.gmail.com with ESMTPSA id g45sm4986008qtb.60.2020.09.19.10.03.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Sep 2020 10:03:23 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 19 Sep 2020 13:03:57 -0400 Message-Id: <20200919170357.13583-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset=yes Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::f32; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf32.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=OCqe5CNd; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: soHSCORtngRX The xz compression is slow; using multiple threads/cores yields a linear performance improvement. * guix/packages.scm (patch-and-repack): Ensure xz is invoked with --threads=N by setting the XZ_DEFAULTS environment variable. --- guix/packages.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guix/packages.scm b/guix/packages.scm index 6598bd3149..678007a807 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2016 Alex Kost ;;; Copyright © 2017, 2019, 2020 Efraim Flashner ;;; Copyright © 2019 Marius Bakke +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -693,6 +694,11 @@ specifies modules in scope when evaluating SNIPPET." (setenv "PATH" (string-append #+xz "/bin" ":" #+decomp "/bin")) + ;; Enable multi-threaded compression for xz. + (setenv "XZ_DEFAULTS" (string-append "--threads=" + (number->string + (parallel-job-count)))) + ;; SOURCE may be either a directory or a tarball. (if (file-is-directory? #+source) (let* ((store (%store-directory)) -- 2.28.0