GNU bug report logs - #43516
[PATCH core-updates] packages: Enable multi-threaded xz compression when repacking source.

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Sat, 19 Sep 2020 17:04:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: bug#43516: closed (Re: [bug#43516] your mail)
Date: Fri, 09 Oct 2020 02:18:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#43516: [PATCH core-updates] packages: Enable multi-threaded xz compression when repacking source.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 43516 <at> debbugs.gnu.org.

-- 
43516: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=43516
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Leo Famulari <leo <at> famulari.name>
Cc: 43516-done <at> debbugs.gnu.org
Subject: Re: [bug#43516] your mail
Date: Thu, 08 Oct 2020 22:17:36 -0400
Leo Famulari <leo <at> famulari.name> writes:

> On Mon, Sep 21, 2020 at 10:00:02PM -0400, Maxim Cournoyer wrote:
>> Seems we can have our cake and eat it, too!
>
> Amazing! I don't have time to check it myself but please proceed as you
> see fit.

Pushed with commit 5a0997ef7f to core-updates.

Enjoy!

Maxim

[Message part 3 (message/rfc822, inline)]
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: [PATCH core-updates] packages: Enable multi-threaded xz compression
 when repacking source.
Date: Sat, 19 Sep 2020 13:03:57 -0400
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 <alezost <at> gmail.com>
 ;;; Copyright © 2017, 2019, 2020 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2019 Marius Bakke <mbakke <at> fastmail.com>
+;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;;
 ;;; 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




This bug report was last modified 4 years and 223 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.