From 14d5ca2e2e57643b6b4acfb980b18b7474c27e7b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 3 Sep 2016 00:17:27 +0200 Subject: 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. --- guix/ui.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 @@ (define module (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. -- cgit v1.2.3