From ac19950507e941b6263f62f4ee4e8934c1b1598e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 27 Oct 2019 22:42:59 +0100 Subject: gnu: bootstrap: Cache the 'bootstrap-executable' origins. This reduces the number of lookups in the 'add-data-to-store' cache from 2705 to 2685 (hit rate: 10% to 9%) when running: GUIX_PROFILING=add-data-to-store-cache guix build libreoffice -nd * gnu/packages/bootstrap.scm (raw-build)[->store]: Use 'lower-object' instead of 'origin->derivation'. This allows the origin-to-derivation mapping to be cached. --- gnu/packages/bootstrap.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gnu/packages/bootstrap.scm') diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index 363c99c7c3..c6e3c697e6 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -33,6 +33,7 @@ #:use-module ((guix derivations) #:select (derivation derivation-input derivation->output-path)) #:use-module ((guix utils) #:select (gnu-triplet->nix-system)) + #:use-module ((guix gexp) #:select (lower-object)) #:use-module (guix memoization) #:use-module (guix i18n) #:use-module (srfi srfi-1) @@ -348,8 +349,8 @@ or false to signal an error." #:allow-other-keys) (define (->store file) (run-with-store store - (origin->derivation (bootstrap-executable file system) - system))) + (lower-object (bootstrap-executable file system) + system))) (let* ((tar (->store "tar")) (xz (->store "xz")) -- cgit v1.2.3