substitute-binary: Avoid reloading the ACL repeatedly.
* guix/scripts/substitute-binary.scm (guix-substitute-binary) <--query>: Cache the result of (current-acl); pass it to 'valid-narinfo?' calls. This saves 12% wall-clock time for "guix build emacs -n".
This commit is contained in:
parent
a7e59c50d2
commit
c6e9485924
|
@ -630,9 +630,10 @@ substituter disabled~%")
|
|||
(with-error-handling ; for signature errors
|
||||
(match args
|
||||
(("--query")
|
||||
(let ((cache (delay (open-cache %cache-url))))
|
||||
(let ((cache (delay (open-cache %cache-url)))
|
||||
(acl (current-acl)))
|
||||
(define (valid? obj)
|
||||
(and (narinfo? obj) (valid-narinfo? obj)))
|
||||
(and (narinfo? obj) (valid-narinfo? obj acl)))
|
||||
|
||||
(let loop ((command (read-line)))
|
||||
(or (eof-object? command)
|
||||
|
|
Loading…
Reference in New Issue