mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-24 11:39:46 -05:00
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.
This commit is contained in:
parent
d727a9343d
commit
5166d02730
1 changed files with 15 additions and 12 deletions
|
@ -167,19 +167,22 @@ (define %bootstrap-patch-inputs
|
|||
("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)
|
||||
(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))))))
|
||||
;; 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)
|
||||
|
|
Loading…
Reference in a new issue