aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-09-03 00:17:27 +0200
committerLudovic Courtès <ludo@gnu.org>2016-09-05 00:06:47 +0200
commit14d5ca2e2e57643b6b4acfb980b18b7474c27e7b (patch)
treede841e553deb26a507e08f32615cbdda9c40e50f /guix
parentf7c9b01f29a3e7a347b9b47db06a7cf1746df521 (diff)
downloadgnu-guix-14d5ca2e2e57643b6b4acfb980b18b7474c27e7b.tar
gnu-guix-14d5ca2e2e57643b6b4acfb980b18b7474c27e7b.tar.gz
ui: Initialize %FILE-PORT-NAME-CANONICALIZATION to #f.
This avoids loads of needless 'stat' calls due to the default 'relative setting and the 'canonicalize-path' calls it leads to. This was especially visible when 'guix substitute' access files in /var/guix/substitute/cache. * guix/ui.scm (run-guix-command): Set %FILE-PORT-NAME-CANONICALIZATION to #f.
Diffstat (limited to 'guix')
-rw-r--r--guix/ui.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index 906b349845..452d16308e 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1187,7 +1187,9 @@ found."
(let ((command-main (module-ref module
(symbol-append 'guix- command))))
(parameterize ((program-name command))
- (apply command-main args))))
+ ;; Disable canonicalization so we don't don't stat unreasonably.
+ (with-fluids ((%file-port-name-canonicalization #f))
+ (apply command-main args)))))
(define (run-guix . args)
"Run the 'guix' command defined by command line ARGS.