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.
This commit is contained in:
Ludovic Courtès 2016-09-03 00:17:27 +02:00
parent f7c9b01f29
commit 14d5ca2e2e
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 3 additions and 1 deletions

View File

@ -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.