guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

08/11: gnu: bootstrap: Cache the 'bootstrap-executable' origins.


From: guix-commits
Subject: 08/11: gnu: bootstrap: Cache the 'bootstrap-executable' origins.
Date: Sun, 27 Oct 2019 18:13:08 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit ac19950507e941b6263f62f4ee4e8934c1b1598e
Author: Ludovic Courtès <address@hidden>
Date:   Sun Oct 27 22:42:59 2019 +0100

    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(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 363c99c..c6e3c69 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"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]