Skip to content
Snippets Groups Projects
Unverified Commit ac199505 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

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.
parent 5166d027
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ (define-module (gnu packages bootstrap) ...@@ -33,6 +33,7 @@ (define-module (gnu packages bootstrap)
#:use-module ((guix derivations) #:use-module ((guix derivations)
#:select (derivation derivation-input derivation->output-path)) #:select (derivation derivation-input derivation->output-path))
#:use-module ((guix utils) #:select (gnu-triplet->nix-system)) #:use-module ((guix utils) #:select (gnu-triplet->nix-system))
#:use-module ((guix gexp) #:select (lower-object))
#:use-module (guix memoization) #:use-module (guix memoization)
#:use-module (guix i18n) #:use-module (guix i18n)
#:use-module (srfi srfi-1) #:use-module (srfi srfi-1)
...@@ -348,8 +349,8 @@ (define* (raw-build store name inputs ...@@ -348,8 +349,8 @@ (define* (raw-build store name inputs
#:allow-other-keys) #:allow-other-keys)
(define (->store file) (define (->store file)
(run-with-store store (run-with-store store
(origin->derivation (bootstrap-executable file system) (lower-object (bootstrap-executable file system)
system))) system)))
(let* ((tar (->store "tar")) (let* ((tar (->store "tar"))
(xz (->store "xz")) (xz (->store "xz"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment