From 276e6589439e79d20f706609eb22f616f62de2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 31 Mar 2024 23:37:29 +0200 Subject: =?UTF-8?q?channels:=20Autoload=20(git=20=E2=80=A6)=20modules.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Autoloading Guile-Git is important in cases where (guix channels) is used for little more than the definition. This is the case, for example, of ‘guix describe’ or ‘guix shell’. This reduces from 177 to 121 the number of .go files loaded when running: ./pre-inst-env strace -e openat -o /tmp/log.strace \ guix describe -p /var/guix/profiles/per-user/$USER/current-guix grep 'openat.*\.go.* = [0-9]' < /tmp/log.strace |wc -l Likewise, it reduces the max RSS (as measured by ‘time -f %M guix describe -p …’) from 54 to 37 MiB. * guix/channels.scm: Autoload (git …) modules. Change-Id: Ia58a99c865bf0f6fe461a1e71390d075e760f8d6 --- guix/channels.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/channels.scm b/guix/channels.scm index 70608561f9..51024dcad4 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -20,7 +20,13 @@ ;;; along with GNU Guix. If not, see . (define-module (guix channels) - #:use-module (git) ;TODO: autoload + #:autoload (git commit) (commit-lookup + commit-id) + #:autoload (git oid) (oid->string + string->oid) + #:autoload (git object) (object-id) + #:autoload (git errors) (GIT_ENOTFOUND) + #:autoload (git structs) (git-error-code) #:autoload (guix git) (update-cached-checkout url+commit->name commit-difference -- cgit v1.2.3