From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 8G5jFXQYC2ZebAAAqHPOHw:P1 (envelope-from ) for ; Mon, 01 Apr 2024 22:26:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 8G5jFXQYC2ZebAAAqHPOHw (envelope-from ) for ; Mon, 01 Apr 2024 22:26:28 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=GckNv3Tf; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712003188; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=QCjaqoWvZGnddRRTmah5ug4E3o1enrIoplhFq6pNJfk=; b=aXrbUvAvcHuOSj7C4LZedvBqdVEa8k6S5JmBwa7OyWfj31hU9ABbiTg5U7PiE6UCyFEQV5 qvDwYqFKGTEQxWPfglqxgiY+HOCW8K2af9poDs8oX4VDy7z1zzN41VC3YpQccS+vlgZsWS jV/iNKFa3RZQUTMjE93swbL2dToRHGDvWKVNjOUvJUUpzrGtyNchjWJ8h9M5pG8Joy8XvC vdlq5PLIYAd2H1+Z4YmKBswtPWIWnE6/JPbnZTE/QazzZ1DJXARN5yfqoJJXLOh+H7buaU 5gK5o0UJKkR8Grxb2+9hFlvTgLYigp7oqdb/6EGomsoL8/mhaRjsh5IA6z3zJQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=GckNv3Tf; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712003188; a=rsa-sha256; cv=none; b=m537oy81rDhk2O8tzPjV5Gs+Z9QN1TJEGWtiPc82Rw/XwnENHXkazyaqYIqxRYeezxcDZD RnT9Gdh1HPkeHd3ymBAFP8cDP0dk6g1D0ztJ7d2ZT/W5cEaBs9aGuRIKFU7rJpgr2d04PL hXdur4rGbNeUeWj4Z1+zjZmVwOGXE+I4JT5e2hzXQitFh7Oi3iGkx//rLjGFKE/7fWntzZ fTSV4Rz+YcVHzbsvTZF4s5hEytIwjcXvbuRINipJ+V5QADfme+YxUrCy6mnAw1BJtRUFBa HYGP426j1Zw8Fu/yuAODSgIHZ4LywAvBdFZZQhTPordV3JDulKsNn2yEsbQWPg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 35C5D62E0A for ; Mon, 01 Apr 2024 22:26:28 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrOEb-00089g-3G; Mon, 01 Apr 2024 16:26:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rrOEH-00083K-1e for guix-patches@gnu.org; Mon, 01 Apr 2024 16:26:07 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rrOEF-0006p8-HF; Mon, 01 Apr 2024 16:26:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rrOEG-0007Hq-FL; Mon, 01 Apr 2024 16:26:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70132] [PATCH 05/11] channels: Autoload (git =?UTF-8?Q?=E2=80=A6?=) modules. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Mon, 01 Apr 2024 20:26:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70132 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70132@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 70132-submit@debbugs.gnu.org id=B70132.171200316327991 (code B ref 70132); Mon, 01 Apr 2024 20:26:04 +0000 Received: (at 70132) by debbugs.gnu.org; 1 Apr 2024 20:26:03 +0000 Received: from localhost ([127.0.0.1]:51671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrOEF-0007HD-Dy for submit@debbugs.gnu.org; Mon, 01 Apr 2024 16:26:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrOED-0007GG-NY for 70132@debbugs.gnu.org; Mon, 01 Apr 2024 16:26:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rrOE4-0006n3-3i; Mon, 01 Apr 2024 16:25:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=QCjaqoWvZGnddRRTmah5ug4E3o1enrIoplhFq6pNJfk=; b=GckNv3TfYNp7xPpfKiZJ b3yha74jfPxX+2+qLO6bNb8rIOyftHzz+PlruxKTJeMPbGSZxKh9fUoSin0Mv8UnUNnMn5SYhNNLD UvgtqyIvhABSilZ0ibUXm/GnOsgiwfKl2csij248UR++3kxuakTQrcH7Lfx8AgaW6lZNtK52oFgDb 4Vfp6Cxs5psnmRh3ZmF3SSmNBFdcoukIodVtJZdOaoTvhLHDDy0dD5b7Ye2vsRrMVHDQEZ1Uzp9Ei 8R7N5NC5z2dEQ629xHsLOUlWos3mINHttd0iK4D6LU5AmflL5xJZkiVf/LL2WyYjclpAckgzWPMyM R1+Wwm9wqZctZQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Mon, 1 Apr 2024 22:25:17 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 35C5D62E0A X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -4.55 X-Spam-Score: -4.55 X-TUID: AUJDRv74Kpj/ 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(-) 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 -- 2.41.0