diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2019-10-27 22:42:59 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2019-10-27 23:05:01 +0100 |
| commit | ac19950507e941b6263f62f4ee4e8934c1b1598e (patch) | |
| tree | 57ad02bc9c5959f00ac67699af704d991244d77f | |
| parent | 5166d027308f4cf694f5cff1c0670b6ff622c226 (diff) | |
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.
| -rw-r--r-- | gnu/packages/bootstrap.scm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index 363c99c7c38..c6e3c697e68 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | #:use-module ((guix derivations) | 33 | #:use-module ((guix derivations) |
| 34 | #:select (derivation derivation-input derivation->output-path)) | 34 | #:select (derivation derivation-input derivation->output-path)) |
| 35 | #:use-module ((guix utils) #:select (gnu-triplet->nix-system)) | 35 | #:use-module ((guix utils) #:select (gnu-triplet->nix-system)) |
| 36 | #:use-module ((guix gexp) #:select (lower-object)) | ||
| 36 | #:use-module (guix memoization) | 37 | #:use-module (guix memoization) |
| 37 | #:use-module (guix i18n) | 38 | #:use-module (guix i18n) |
| 38 | #:use-module (srfi srfi-1) | 39 | #:use-module (srfi srfi-1) |
| @@ -348,8 +349,8 @@ or false to signal an error." | |||
| 348 | #:allow-other-keys) | 349 | #:allow-other-keys) |
| 349 | (define (->store file) | 350 | (define (->store file) |
| 350 | (run-with-store store | 351 | (run-with-store store |
| 351 | (origin->derivation (bootstrap-executable file system) | 352 | (lower-object (bootstrap-executable file system) |
| 352 | system))) | 353 | system))) |
| 353 | 354 | ||
| 354 | (let* ((tar (->store "tar")) | 355 | (let* ((tar (->store "tar")) |
| 355 | (xz (->store "xz")) | 356 | (xz (->store "xz")) |
