diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2024-03-31 23:37:29 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2024-04-15 22:36:42 +0200 |
| commit | 276e6589439e79d20f706609eb22f616f62de2d3 (patch) | |
| tree | bdcbb8d349b7bf30163bb4f936314908ab407a5b | |
| parent | 96d2de01853a5955ad882a565c903e1b1689b4f0 (diff) | |
channels: Autoload (git …) modules.
Autoloading Guile-Git is important in cases where (guix channels) is
used for little more than the <channel> 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
| -rw-r--r-- | guix/channels.scm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/guix/channels.scm b/guix/channels.scm index 70608561f93..51024dcad46 100644 --- a/guix/channels.scm +++ b/guix/channels.scm | |||
| @@ -20,7 +20,13 @@ | |||
| 20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | 20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 21 | 21 | ||
| 22 | (define-module (guix channels) | 22 | (define-module (guix channels) |
| 23 | #:use-module (git) ;TODO: autoload | 23 | #:autoload (git commit) (commit-lookup |
| 24 | commit-id) | ||
| 25 | #:autoload (git oid) (oid->string | ||
| 26 | string->oid) | ||
| 27 | #:autoload (git object) (object-id) | ||
| 28 | #:autoload (git errors) (GIT_ENOTFOUND) | ||
| 29 | #:autoload (git structs) (git-error-code) | ||
| 24 | #:autoload (guix git) (update-cached-checkout | 30 | #:autoload (guix git) (update-cached-checkout |
| 25 | url+commit->name | 31 | url+commit->name |
| 26 | commit-difference | 32 | commit-difference |
