[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/04: ui: Initialize %FILE-PORT-NAME-CANONICALIZATION to #f.
From: |
Ludovic Courtès |
Subject: |
01/04: ui: Initialize %FILE-PORT-NAME-CANONICALIZATION to #f. |
Date: |
Sun, 4 Sep 2016 22:07:33 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit 14d5ca2e2e57643b6b4acfb980b18b7474c27e7b
Author: Ludovic Courtès <address@hidden>
Date: Sat Sep 3 00:17:27 2016 +0200
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 906b349..452d163 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.