[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/19: self: Build directories in chunks of max 25 files at a time.
From: |
guix-commits |
Subject: |
01/19: self: Build directories in chunks of max 25 files at a time. |
Date: |
Sat, 2 Sep 2023 11:48:56 -0400 (EDT) |
janneke pushed a commit to branch hurd-team
in repository guix.
commit 45de303d8b544eed1662ba9697bd1a2a33364480
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Thu Jun 22 08:30:25 2023 +0200
self: Build directories in chunks of max 25 files at a time.
Similar to split build of make-go in Makefile.am, this breaks-up building
directories into chunks of max 25 files. Also force garbage collection.
* guix/self.scm (compiled-modules)[process-directory]: Split building of
directories into chunks of max 25 files.
---
guix/self.scm | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/guix/self.scm b/guix/self.scm
index 81a36e007f..fc2dfd8131 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
+;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1210,7 +1211,8 @@ containing MODULE-FILES and possibly other files as well."
'((guix build compile)
(guix build utils)))
#~(begin
- (use-modules (srfi srfi-26)
+ (use-modules (srfi srfi-1)
+ (srfi srfi-26)
(ice-9 match)
(ice-9 format)
(ice-9 threads)
@@ -1244,12 +1246,23 @@ containing MODULE-FILES and possibly other files as
well."
(force-output))
(define (process-directory directory files output)
- ;; Hide compilation warnings.
- (parameterize ((current-warning-port (%make-void-port "w")))
- (compile-files directory #$output files
- #:workers (parallel-job-count)
- #:report-load report-load
- #:report-compilation report-compilation)))
+ (let* ((size 25) ;compile max 25 files a time
+ (chunks (unfold
+ (lambda (seed) (< (length seed) size)) ;p
+ (cute take <> size) ;f
+ (cute drop <> size) ;g
+ files ;seed
+ list))) ;tail
+ (for-each
+ (lambda (chunck)
+ ;; Hide compilation warnings.
+ (parameterize ((current-warning-port (%make-void-port "w")))
+ (compile-files directory output chunck
+ #:workers (parallel-job-count)
+ #:report-load report-load
+ #:report-compilation report-compilation))
+ (gc))
+ chunks)))
(setvbuf (current-output-port) 'line)
(setvbuf (current-error-port) 'line)
- branch hurd-team created (now 17f1e06a5f), guix-commits, 2023/09/02
- 04/19: squash! self: Build directories in chunks of max 25 files at a time. -- typo, guix-commits, 2023/09/02
- 06/19: maint: Support `guix shell' in Guix's git archive with manifest.scm., guix-commits, 2023/09/02
- 07/19: gnu: gdk-pixbuf: Build without gobject-introspection for the Hurd., guix-commits, 2023/09/02
- 09/19: hurd: Support system init in /libexec/runsystem., guix-commits, 2023/09/02
- 11/19: system: hurd: Add procps to %base-packages/hurd., guix-commits, 2023/09/02
- 13/19: DRAFT hurd: Support second boot., guix-commits, 2023/09/02
- 03/19: gnu: guix: Update to 1.4.0-12.329069a2fb., guix-commits, 2023/09/02
- 08/19: gnu: librsvg: Build without gobject-introspection for the Hurd., guix-commits, 2023/09/02
- 10/19: hurd-boot: Support system init: Create essential device nodes., guix-commits, 2023/09/02
- 01/19: self: Build directories in chunks of max 25 files at a time.,
guix-commits <=
- 19/19: Revert "DRAFT daemon: Support chroot builds on GNU/Hurd.", guix-commits, 2023/09/02
- 05/19: squash! self: Build directories in chunks of max 25 files at a time. -- remove gc, guix-commits, 2023/09/02
- 02/19: gnu: guix: Update to 1.4.0-11.45de303d8b., guix-commits, 2023/09/02
- 14/19: DRAFT hurd-boot: Support second boot., guix-commits, 2023/09/02
- 16/19: gnu: Add libc-locales-for-target and glibc-locales/hurd., guix-commits, 2023/09/02
- 18/19: DRAFT daemon: Support chroot builds on GNU/Hurd., guix-commits, 2023/09/02
- 15/19: DRAFT system: examples: Add devel-hurd.tmpl., guix-commits, 2023/09/02
- 17/19: locale: Set %default-locale-definitions to glibc/hurd on the Hurd., guix-commits, 2023/09/02
- 12/19: system: hurd: Add swap-services to hurd-default-essential-services., guix-commits, 2023/09/02