[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#70132] [PATCH 08/11] guix: Delay loading of (gnutls).
From: |
Ludovic Courtès |
Subject: |
[bug#70132] [PATCH 08/11] guix: Delay loading of (gnutls). |
Date: |
Mon, 1 Apr 2024 22:25:20 +0200 |
(web …) modules pull in (gnutls) indirectly. Arrange to load them
lazily, thereby reducing I/O and allocations when GnuTLS is not needed
such as when running ‘guix describe’ or ‘guix shell’ on a cache hit.
* guix/download.scm: Autoload (web uri).
* guix/scripts/describe.scm: Likewise.
* guix/store.scm: Likewise.
(%default-substitute-urls): Remove ‘resolve-interface’ call and use
https URLs unconditionally.
Change-Id: Ide470c556a14866e8740966d25821df487a79859
---
guix/download.scm | 2 +-
guix/scripts/describe.scm | 4 ++--
guix/store.scm | 13 ++++++++-----
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/guix/download.scm b/guix/download.scm
index 192c47f113..b251e1f6c0 100644
--- a/guix/download.scm
+++ b/guix/download.scm
@@ -32,7 +32,7 @@ (define-module (guix download)
#:use-module (guix monads)
#:use-module (guix gexp)
#:autoload (guix build utils) (call-with-temporary-output-file)
- #:use-module (web uri)
+ #:autoload (web uri) (string->uri uri-scheme uri-path)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (%download-methods
diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm
index 449ab4b252..70ae84e9f6 100644
--- a/guix/scripts/describe.scm
+++ b/guix/scripts/describe.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2018, 2019, 2020, 2021, 2023 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2019, 2020, 2021, 2023, 2024 Ludovic Courtès
<ludo@gnu.org>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
@@ -37,7 +37,7 @@ (define-module (guix scripts describe)
#:use-module (ice-9 match)
#:use-module (ice-9 format)
#:autoload (ice-9 pretty-print) (pretty-print)
- #:use-module (web uri)
+ #:autoload (web uri) (string->uri uri-host)
#:export (display-profile-content
channel-commit-hyperlink
diff --git a/guix/store.scm b/guix/store.scm
index 97c4f32a5b..e808b43ba9 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012-2023 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
@@ -49,7 +49,12 @@ (define-module (guix store)
#:use-module (ice-9 popen)
#:autoload (ice-9 threads) (current-processor-count)
#:use-module (ice-9 format)
- #:use-module (web uri)
+ #:autoload (web uri) (uri?
+ string->uri
+ uri-scheme
+ uri-host
+ uri-port
+ uri-path)
#:export (%daemon-socket-uri
%gc-roots-directory
%default-substitute-urls
@@ -764,9 +769,7 @@ (define %default-substitute-urls
;; Default list of substituters. This is *not* the list baked in
;; 'guix-daemon', but it is used by 'guix-service-type' and and a couple of
;; clients ('guix build --log-file' uses it.)
- (map (if (false-if-exception (resolve-interface '(gnutls)))
- (cut string-append "https://" <>)
- (cut string-append "http://" <>))
+ (map (cut string-append "https://" <>)
'("ci.guix.gnu.org"
"bordeaux.guix.gnu.org")))
--
2.41.0
- [bug#70132] [PATCH 03/11] channels: Move ‘commit-short-id’ to (guix git)., (continued)
- [bug#70132] [PATCH 03/11] channels: Move ‘commit-short-id’ to (guix git)., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 01/11] channels: Use SRFI-71 instead of SRFI-11., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 04/11] git: Add ‘tag->commit’ and use it in (guix channels)., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 05/11] channels: Autoload (git …) modules., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 02/11] git: Add ‘repository-info’ and use it in (guix channels)., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 06/11] guix system: Autoload some more., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 10/11] Autoload (guix build syscalls)., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 11/11] Autoload (gcrypt hash)., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 08/11] guix: Delay loading of (gnutls).,
Ludovic Courtès <=
- [bug#70132] [PATCH 09/11] ui: Delay use of (guix build syscalls)., Ludovic Courtès, 2024/04/01
- [bug#70132] [PATCH 07/11] utils: Don’t re-export ‘call-with-temporary-output-file’., Ludovic Courtès, 2024/04/01
- bug#70132: [PATCH 00/11] Improve startup time and memory footprint for short-lived commands, Ludovic Courtès, 2024/04/15
- Message not available