diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-04-01 22:56:33 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-04-01 23:47:51 +0200 |
commit | c6e948592485fecfb1d290afb3a5bf4045bc6a9c (patch) | |
tree | 28fce3a99223623797734d65608b4a5b6f204e77 /guix | |
parent | a7e59c50d29ff6c9e1551a70a9987cb37ea864ac (diff) |
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".
Diffstat (limited to 'guix')
-rwxr-xr-x | guix/scripts/substitute-binary.scm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/scripts/substitute-binary.scm b/guix/scripts/substitute-binary.scm index 8e08bf1172..f61d06a05c 100755 --- a/guix/scripts/substitute-binary.scm +++ b/guix/scripts/substitute-binary.scm @@ -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) |