[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/11: gnu: bootstrap: 'bootstrap-origin' preserves eq?-ness when no cha
From: |
guix-commits |
Subject: |
07/11: gnu: bootstrap: 'bootstrap-origin' preserves eq?-ness when no changes are made. |
Date: |
Sun, 27 Oct 2019 18:13:08 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 5166d027308f4cf694f5cff1c0670b6ff622c226
Author: Ludovic Courtès <address@hidden>
Date: Sun Oct 27 22:32:09 2019 +0100
gnu: bootstrap: 'bootstrap-origin' preserves eq?-ness when no changes are
made.
This reduces the number of lookups in the 'add-data-to-store' cache from
2743 to 2705 (hit rate: 11% to 10%) when running
GUIX_PROFILING=add-data-to-store-cache guix build libreoffice -nd
The execution time of "guix build libreoffice -nd" goes from 1.80s to 1.78s.
* gnu/packages/bootstrap.scm (bootstrap-origin): Return SOURCE unchanged
when its has no patches and no snippet.
---
gnu/packages/bootstrap.scm | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index ee713db..363c99c 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -167,19 +167,22 @@ for system '~a'")
("patch" ,%bootstrap-coreutils&co)))
(let ((orig-method (origin-method source)))
- (origin (inherit source)
- (method (cond ((eq? orig-method url-fetch)
- (boot url-fetch))
- (else orig-method)))
- (patch-guile %bootstrap-guile)
- (patch-inputs %bootstrap-patch-inputs)
-
- ;; Patches can be origins as well, so process them.
- (patches (map (match-lambda
- ((? origin? patch)
- (bootstrap-origin patch))
- (patch patch))
- (origin-patches source))))))
+ (if (or (not (null? (origin-patches source)))
+ (origin-snippet source))
+ (origin (inherit source)
+ (method (if (eq? orig-method url-fetch)
+ (boot url-fetch)
+ orig-method))
+ (patch-guile %bootstrap-guile)
+ (patch-inputs %bootstrap-patch-inputs)
+
+ ;; Patches can be origins as well, so process them.
+ (patches (map (match-lambda
+ ((? origin? patch)
+ (bootstrap-origin patch))
+ (patch patch))
+ (origin-patches source))))
+ source)))
(define* (package-from-tarball name source program-to-test description
#:key snippet)
- branch master updated (6d18427 -> b13b938), guix-commits, 2019/10/27
- 02/11: derivations: 'build-expression->derivation' caches its module derivations., guix-commits, 2019/10/27
- 01/11: derivations: Introduce 'imported+compiled-modules'., guix-commits, 2019/10/27
- 04/11: store: Allow objects in the cache to be inserted and search for with 'equal?'., guix-commits, 2019/10/27
- 03/11: gexp: Add 'imported+compiled-modules'., guix-commits, 2019/10/27
- 10/11: pull: Honor '/etc/guix/channels.scm'., guix-commits, 2019/10/27
- 08/11: gnu: bootstrap: Cache the 'bootstrap-executable' origins., guix-commits, 2019/10/27
- 06/11: derivations: Don't memoize 'derivation->bytevector'., guix-commits, 2019/10/27
- 05/11: gexp: Cache the module to derivation mappings., guix-commits, 2019/10/27
- 11/11: news: Add entry for /etc/guix/channels.scm., guix-commits, 2019/10/27
- 07/11: gnu: bootstrap: 'bootstrap-origin' preserves eq?-ness when no changes are made.,
guix-commits <=
- 09/11: channels: Refer to 'guile-json-3'., guix-commits, 2019/10/27