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:
		
							parent
							
								
									f7c9b01f29
								
							
						
					
					
						commit
						14d5ca2e2e
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -1187,7 +1187,9 @@ found."
 | 
				
			||||||
  (let ((command-main (module-ref module
 | 
					  (let ((command-main (module-ref module
 | 
				
			||||||
                                  (symbol-append 'guix- command))))
 | 
					                                  (symbol-append 'guix- command))))
 | 
				
			||||||
    (parameterize ((program-name 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)
 | 
					(define (run-guix . args)
 | 
				
			||||||
  "Run the 'guix' command defined by command line ARGS.
 | 
					  "Run the 'guix' command defined by command line ARGS.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue