guix package: Reduce startup time by ~50%.

As measured with:

  time sh -c 'for i in `seq 1 10` ; do guix package --search-paths ; done'

On my machine, when running:

  strace -o ,,s guix package --search-paths

the number returned by:

  grep -E '^(open|l?stat).*\.go' ,,s | wc -l

drops from 1610 to 837.

* guix/scripts/package.scm: Remove two unnecessary #:use-module forms.
Autoload (gnu packages ...) modules.
This commit is contained in:
Ludovic Courtès 2015-11-24 18:12:03 +01:00
parent 8b749cf3cb
commit cc3de1da41
1 changed files with 4 additions and 6 deletions

View File

@ -32,22 +32,20 @@
#:use-module (guix scripts) #:use-module (guix scripts)
#:use-module (guix scripts build) #:use-module (guix scripts build)
#:use-module ((guix build utils) #:use-module ((guix build utils)
#:select (directory-exists? mkdir-p search-path-as-list)) #:select (directory-exists? mkdir-p))
#:use-module (ice-9 format) #:use-module (ice-9 format)
#:use-module (ice-9 match) #:use-module (ice-9 match)
#:use-module (ice-9 regex)
#:use-module (ice-9 vlist) #:use-module (ice-9 vlist)
#:use-module (srfi srfi-1) #:use-module (srfi srfi-1)
#:use-module (srfi srfi-11) #:use-module (srfi srfi-11)
#:use-module (srfi srfi-19)
#:use-module (srfi srfi-26) #:use-module (srfi srfi-26)
#:use-module (srfi srfi-34) #:use-module (srfi srfi-34)
#:use-module (srfi srfi-35) #:use-module (srfi srfi-35)
#:use-module (srfi srfi-37) #:use-module (srfi srfi-37)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages base) #:autoload (gnu packages base) (canonical-package)
#:use-module (gnu packages guile) #:autoload (gnu packages guile) (guile-2.0)
#:use-module ((gnu packages bootstrap) #:select (%bootstrap-guile)) #:autoload (gnu packages bootstrap) (%bootstrap-guile)
#:export (delete-generations #:export (delete-generations
display-search-paths display-search-paths
guix-package)) guix-package))