[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/08: self: Parallelize translation of the manual.
From: |
guix-commits |
Subject: |
07/08: self: Parallelize translation of the manual. |
Date: |
Mon, 22 Jun 2020 18:04:32 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 2f6901c9df7d4fb2e0c0d67f9bb0bb4cabaf5a29
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Jun 22 23:58:42 2020 +0200
self: Parallelize translation of the manual.
The guix-translated-texinfo.drv execution time goes from 1mn42s with 1
core to 1mn8s with 4 cores.
* guix/self.scm (translate-texi-manuals)[build]: Use 'n-par-for-each'
instead of 'for-each' for translation.
---
guix/self.scm | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/guix/self.scm b/guix/self.scm
index 12727dd..e1350a7 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -290,7 +290,7 @@ DOMAIN, a gettext domain."
#~(begin
(use-modules (guix build utils) (guix build po)
(ice-9 match) (ice-9 regex) (ice-9 textual-ports)
- (ice-9 vlist)
+ (ice-9 vlist) (ice-9 threads)
(srfi srfi-1))
(define (translate-tmp-texi po source output)
@@ -413,16 +413,18 @@ a list of extra files, such as '(\"contributing\")."
(setenv "LC_ALL" "en_US.UTF-8")
(setlocale LC_ALL "en_US.UTF-8")
- (for-each (match-lambda
- ((language . po)
- (translate-texi "guix" po language
- #:extras '("contributing"))))
- (available-translations "." "guix-manual"))
-
- (for-each (match-lambda
- ((language . po)
- (translate-texi "guix-cookbook" po language)))
- (available-translations "." "guix-cookbook"))
+ (n-par-for-each (parallel-job-count)
+ (match-lambda
+ ((language . po)
+ (translate-texi "guix" po language
+ #:extras '("contributing"))))
+ (available-translations "." "guix-manual"))
+
+ (n-par-for-each (parallel-job-count)
+ (match-lambda
+ ((language . po)
+ (translate-texi "guix-cookbook" po language)))
+ (available-translations "." "guix-cookbook"))
(for-each (lambda (file)
(install-file file #$output))
- branch master updated (62115b7 -> 96a95aa), guix-commits, 2020/06/22
- 02/08: doc: cookbook: Mention "guix hash -rx" for Git checkouts., guix-commits, 2020/06/22
- 04/08: po: Avoid regexps when interpreting '\n' sequences., guix-commits, 2020/06/22
- 06/08: self: Move statements after definitions in translation derivation., guix-commits, 2020/06/22
- 01/08: doc: cookbook: Clarify 'git-fetch' conventions., guix-commits, 2020/06/22
- 03/08: self: Speed up Texinfo cross-reference translation., guix-commits, 2020/06/22
- 07/08: self: Parallelize translation of the manual.,
guix-commits <=
- 05/08: po: Micro-optimize 'read-po-file'., guix-commits, 2020/06/22
- 08/08: doc: cookbook: Tweak intro to the REPL., guix-commits, 2020/06/22