emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48826: closed ([PATCH] scripts: substitute: Cache connection when lo


From: GNU bug Tracking System
Subject: bug#48826: closed ([PATCH] scripts: substitute: Cache connection when looking for narinfos.)
Date: Sun, 06 Jun 2021 16:57:01 +0000

Your message dated Sun, 06 Jun 2021 18:56:43 +0200
with message-id <875yyrorsk.fsf_-_@gnu.org>
and subject line Re: bug#48826: [PATCH] scripts: substitute: Cache connection 
when looking for narinfos.
has caused the debbugs.gnu.org bug report #48826,
regarding [PATCH] scripts: substitute: Cache connection when looking for 
narinfos.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
48826: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48826
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] scripts: substitute: Cache connection when looking for narinfos. Date: Fri, 4 Jun 2021 09:02:23 +0200
The process-substitution procedure is opening two distinct connections. The
first one when looking for narinfo by calling lookup-narinfo and the other one
when fetching nar files.

Cache the connection when looking for narinfos so that process-substitution
only opens one connection.

* guix/scripts/substitute.scm (lookup-narinfo): Cache connection by using
open-connection-for-uri/cached.
---
 guix/scripts/substitute.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 54311c3e08..44448ff3e9 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -163,7 +163,9 @@ if file doesn't exist, and the narinfo otherwise."
 (define (lookup-narinfo caches path authorized?)
   "Return the narinfo for PATH in CACHES, or #f when no substitute for PATH
 was found."
-  (match (lookup-narinfos/diverse caches (list path) authorized?)
+  (match (lookup-narinfos/diverse
+          caches (list path) authorized?
+          #:open-connection open-connection-for-uri/cached)
     ((answer) answer)
     (_        #f)))
 
-- 
2.31.1




--- End Message ---
--- Begin Message --- Subject: Re: bug#48826: [PATCH] scripts: substitute: Cache connection when looking for narinfos. Date: Sun, 06 Jun 2021 18:56:43 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Hey,

> Good catch, LGTM!

Pushed as a068ed6a5f5b3535fce49ac4eca1fec82edd6fdc.

Thanks,

Mathieu


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]