From: Simon Tournier <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>, 70132@debbugs.gnu.org
Cc: "Josselin Poiret" <dev@jpoiret.xyz>,
"Mathieu Othacehe" <othacehe@gnu.org>,
"Ludovic Courtès" <ludo@gnu.org>,
"Tobias Geerinckx-Rice" <me@tobias.gr>,
"Ricardo Wurmus" <rekado@elephly.net>,
"Christopher Baines" <guix@cbaines.net>
Subject: [bug#70132] [PATCH 05/11] channels: Autoload (git …) modules.
Date: Tue, 16 Apr 2024 00:45:20 +0200 [thread overview]
Message-ID: <87r0f6w8hr.fsf@gmail.com> (raw)
In-Reply-To: <b8b31c5056e8e01990e7ce22d1c07aaced22ec76.1712002698.git.ludo@gnu.org>
Hi,
On lun., 01 avril 2024 at 22:25, Ludovic Courtès <ludo@gnu.org> wrote:
> 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
> ---
> guix/channels.scm | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> 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 <http://www.gnu.org/licenses/>.
>
> (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
Oh! Awesome!! Thanks for the tricks.
Cheers,
simon
next prev parent reply other threads:[~2024-04-15 23:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-01 20:22 [bug#70132] [PATCH 00/11] Improve startup time and memory footprint for short-lived commands Ludovic Courtès
2024-04-01 20:25 ` [bug#70132] [PATCH 01/11] channels: Use SRFI-71 instead of SRFI-11 Ludovic Courtès
2024-04-15 22:41 ` Simon Tournier
2024-04-01 20:25 ` [bug#70132] [PATCH 02/11] git: Add ‘repository-info’ and use it in (guix channels) Ludovic Courtès
2024-04-01 20:25 ` [bug#70132] [PATCH 03/11] channels: Move ‘commit-short-id’ to (guix git) Ludovic Courtès
2024-04-01 20:25 ` [bug#70132] [PATCH 04/11] git: Add ‘tag->commit’ and use it in (guix channels) Ludovic Courtès
2024-04-01 20:25 ` [bug#70132] [PATCH 05/11] channels: Autoload (git …) modules Ludovic Courtès
2024-04-15 22:45 ` Simon Tournier [this message]
2024-04-01 20:25 ` [bug#70132] [PATCH 06/11] guix system: Autoload some more Ludovic Courtès
2024-04-01 20:25 ` [bug#70132] [PATCH 07/11] utils: Don’t re-export ‘call-with-temporary-output-file’ Ludovic Courtès
2024-04-01 20:25 ` [bug#70132] [PATCH 08/11] guix: Delay loading of (gnutls) Ludovic Courtès
2024-04-01 20:25 ` [bug#70132] [PATCH 09/11] ui: Delay use of (guix build syscalls) Ludovic Courtès
2024-04-01 20:25 ` [bug#70132] [PATCH 10/11] Autoload " Ludovic Courtès
2024-04-01 20:25 ` [bug#70132] [PATCH 11/11] Autoload (gcrypt hash) Ludovic Courtès
2024-04-15 21:43 ` bug#70132: [PATCH 00/11] Improve startup time and memory footprint for short-lived commands Ludovic Courtès
[not found] ` <handler.70132.D70132.17132174197570.notifdone@debbugs.gnu.org>
2024-04-15 22:57 ` [bug#70132] Not receiving Emails from Debbugs (was Re: bug#70132: closed ...) Simon Tournier
2024-04-16 16:42 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0f6w8hr.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=70132@debbugs.gnu.org \
--cc=dev@jpoiret.xyz \
--cc=guix@cbaines.net \
--cc=ludo@gnu.org \
--cc=me@tobias.gr \
--cc=othacehe@gnu.org \
--cc=rekado@elephly.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.