From unknown Fri Aug 15 12:52:21 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#46100 <46100@debbugs.gnu.org> To: bug#46100 <46100@debbugs.gnu.org> Subject: Status: [PATCH 0/4] Memoize inferior package access. Reply-To: bug#46100 <46100@debbugs.gnu.org> Date: Fri, 15 Aug 2025 19:52:21 +0000 retitle 46100 [PATCH 0/4] Memoize inferior package access. reassign 46100 guix-patches submitter 46100 Ricardo Wurmus severity 46100 normal tag 46100 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 25 08:34:16 2021 Received: (at submit) by debbugs.gnu.org; 25 Jan 2021 13:34:16 +0000 Received: from localhost ([127.0.0.1]:38223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l420W-0001nM-AB for submit@debbugs.gnu.org; Mon, 25 Jan 2021 08:34:16 -0500 Received: from lists.gnu.org ([209.51.188.17]:39872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l420U-0001nB-BG for submit@debbugs.gnu.org; Mon, 25 Jan 2021 08:34:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l420U-0008Bz-4H for guix-patches@gnu.org; Mon, 25 Jan 2021 08:34:14 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21184) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l420O-0002ou-Bh for guix-patches@gnu.org; Mon, 25 Jan 2021 08:34:13 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1611581645; cv=none; d=zohomail.com; s=zohoarc; b=PMrl9QLDCFsYoEtDcW0/2gBNdVNw7f+CJLxYYH3JK6iPdvXbCMSPIPEepAOnoLRGzi5yU+qdVsvdjrF20CWFFQmEADy1iNnFSroirjF7fLAwv9xeNFv0KRQzSXTfjmJq4/Q6NONJYYlJoAuMKOGDbe1iGFMziTG6GktLZcUGxes= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611581645; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=qF0zhHqy+nryUb7GTsJDkYtoU8V7da9/1ViYVVIj7KA=; b=RmhZ+97qouiASaMyTb7972JZtF2NpMz7ZbViSJS+vQAUlZ4ovoM8UG7HC6mL3Z9JuhabEeY4C3cJccFOx2SujSEEFdCCVG8bou+f6HYbsEoqGX3d0YAynBzO4uuCPIvTafPWfw/NW0Gi2+KshrveFcMaMBDSmohZDhnVXZSrxMw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1611581645; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=qF0zhHqy+nryUb7GTsJDkYtoU8V7da9/1ViYVVIj7KA=; b=SFwSzgB60OFgvf3Vfm1DNBgrbvD+5Qrh2AkcThmcdgVOHM9aj5v0QqNXcmt4Jyti Dr2HbFadQv8O96JIFGqX+03vVznHoJGzHsXt9CFEPCpI/mH1dkEe3OtRejrWy2/IcHq 5uaX7b+Ib36P9CUWWkbcDc954T51YK5bW/mdXl/s= Received: from localhost (p54ad4ec7.dip0.t-ipconnect.de [84.173.78.199]) by mx.zohomail.com with SMTPS id 1611581642477896.3441745357472; Mon, 25 Jan 2021 05:34:02 -0800 (PST) User-agent: mu4e 1.4.13; emacs 27.1 From: Ricardo Wurmus To: guix-patches@gnu.org Subject: [PATCH 0/4] Memoize inferior package access. X-Debbugs-CC: Ludovic =?utf-8?Q?Court=C3=A8s?= X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Mon, 25 Jan 2021 14:33:59 +0100 Message-ID: <87k0s1jg3c.fsf@elephly.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-ZohoMailClient: External X-Zoho-Virus-Status: 1 Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@elephly.net; helo=sender4-of-o51.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Guix, this patch set improves performance of inferior lookups by caching previous results. The change in inferior-package->manifest-entry has the biggest impact in my test case, where I'm building a profile consisting of a few R packages. Without this patch it takes more than 14 seconds. With cached results it takes less than a second. Included is a patch that Ludo provided on #guix-hpc for which I wrote a commit message. The test case is attached. Ludovic Court=C3=A8s (1): inferior: Memoize package input field access. Ricardo Wurmus (3): guix: Fix typo. inferior: Memoize inferior-package->manifest-entry. inferior: Memoize inferior package search path access. guix/inferior.scm | 155 ++++++++++++++++++++++++---------------------- 1 file changed, 81 insertions(+), 74 deletions(-) base-commit: 90a6ce0b1852608185e3ba7fe09e585b43eac3be --=20 2.29.2 --=20 Ricardo --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=inferior-slow.scm (import (guix packages) (guix inferior) (guix store) (guix monads)(guix gexp) (guix profiles) (guix derivations) (ice-9 match) (srfi srfi-19)) (pk 'current-guix) (define current-guix ;; /home/rekado/.config/guix/current (let* ((default-guix "/gnu/store/ig6alp71w39bmfy51f1w32z0k2rbh6ra-profile") (current-guix-inferior #false)) (lambda () (or current-guix-inferior (begin (set! current-guix-inferior (open-inferior (canonicalize-path default-guix))) current-guix-inferior))))) (define (lookup-package specification) (match (lookup-inferior-packages (current-guix) specification) ((first . rest) first) (x (error "oops" x)))) (define specs (list "bash-minimal" "r-minimal" "r-ggplot2" "r-ggrepel" "r-deseq2" "r-dt" "r-pheatmap" "r-corrplot" "r-reshape2" "r-plotly" "r-scales" "r-crosstalk" "r-gprofiler" "r-rtracklayer" "r-summarizedexperiment")) (pk 'packages) (define packages (map lookup-package specs)) (pk 'packages->manifest) (let ((start (current-time))) (let ((manifest (packages->manifest packages))) (pk 'packages->manifest-done (time-difference (current-time) start)))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 25 08:37:53 2021 Received: (at 46100) by debbugs.gnu.org; 25 Jan 2021 13:37:53 +0000 Received: from localhost ([127.0.0.1]:38229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4240-0001u5-Ra for submit@debbugs.gnu.org; Mon, 25 Jan 2021 08:37:53 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l423z-0001tr-N5 for 46100@debbugs.gnu.org; Mon, 25 Jan 2021 08:37:52 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1611581867; cv=none; d=zohomail.com; s=zohoarc; b=S5CJTfGvaNkA6oaaXDz5mJ+kG4dSMB2J5PG++VEV6HyN7lNO7CkrjpDh3PLa3dsFu+0qK5Fm2umLyY28qpntGeDTgeR93quDV9+6Ez1W5TBpu2mNdhPhgVMfDxCFz2RR0+N2PGX26TMCYbwjyeh3gdlERb7IBhDjyiebZe9t/jo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611581867; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=6UH5E1aB1D/0XFXNBiUgCFHiWKb5ysbfOvEUqn/YDL4=; b=OnlNNsTeQ7rkxUMGoLA3O98Uf2DlG7hATGi5TXq47u8Rq6nyK5WexguxAzYL6FwniAo8Z0t8cbWKCUVXXKGr453xmf4aIER+BQHyuQHk18kXRpL9bQTwd5trEELPyI5lWFcJ8x+VJRlWs61ewdJvYzQnNIuMWmES4f7fTIldE9Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1611581867; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Cc:Message-ID:Subject:Date:MIME-Version:Content-Transfer-Encoding:Content-Type; bh=6UH5E1aB1D/0XFXNBiUgCFHiWKb5ysbfOvEUqn/YDL4=; b=DsaelqKDY9QwXfOLcvOMiAE4pNNZxpqXnWtgNUwtyf3IEDoRDFtOaNhVD2cU6nYK GVANWqAbtcePS1gNjHxJb8fojwV/kM0tstVHyP4FRpw7E+0998A2qplVBm7/xN6+7Be pt6uXXCFzcZEYTUA6yu6fGwvmhP1kS0kcPlT1m64= Received: from localhost (p54ad4ec7.dip0.t-ipconnect.de [84.173.78.199]) by mx.zohomail.com with SMTPS id 1611581865172871.2063357970442; Mon, 25 Jan 2021 05:37:45 -0800 (PST) From: Ricardo Wurmus To: 46100@debbugs.gnu.org, guix-patches@gnu.org Message-ID: <20210125133738.15609-1-rekado@elephly.net> Subject: [PATCH 1/4] guix: Fix typo. Date: Mon, 25 Jan 2021 14:37:35 +0100 X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset=utf8 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46100 Cc: Ricardo Wurmus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/inferior.scm (inferior-available-packages): Remove extra word in docstring. --- guix/inferior.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/guix/inferior.scm b/guix/inferior.scm index 2fe91beaab..da6983d9a6 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -311,8 +311,7 @@ Raise '&inferior-exception' when an exception is read f= rom PORT." "Return the list of name/version pairs corresponding to the set of packa= ges available in INFERIOR. =20 -This is faster and requires less resource-intensive than calling -'inferior-packages'." +This is faster and less resource-intensive than calling 'inferior-packages= '." (if (inferior-eval '(defined? 'fold-available-packages) inferior) (inferior-eval '(fold-available-packages --=20 2.29.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 25 08:37:59 2021 Received: (at 46100) by debbugs.gnu.org; 25 Jan 2021 13:37:59 +0000 Received: from localhost ([127.0.0.1]:38235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4247-0001ub-DA for submit@debbugs.gnu.org; Mon, 25 Jan 2021 08:37:59 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4245-0001uN-Jt for 46100@debbugs.gnu.org; Mon, 25 Jan 2021 08:37:57 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1611581871; cv=none; d=zohomail.com; s=zohoarc; b=CWnD/gwIqd53rHHGNxn8aVy63UCpjh8J7QKMNVtyij8FrcJVO0vSDqTf6QwWLf8m+VHz1a6yAquMGm5MzwucOyJGUku1TKvn+uq+a0j2Lgb3ozeInjYcL8rEqmjBa07Sv32vPNgNFc7zHx++5Ati/blIvHBnyqyX+e9ulB3kixc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611581871; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=cAPpwspxUMRYLMxOYgtP5Nr+GXLx0YRveoeqjP/TTB4=; b=Gig9Lplb7GtcF2qaZUAYcvOHAKf0Hi45s2oZel2jkjAYKABXJW6CpG3AspmFc1L1nwqw19/0I6tVug8xEETtJmj6hD81GjXfrphd0V6qFQjjHVaw3PjipmBSEONdiZ6zH615YpiApZk/dYl60cHlVZ1/dFooSP6zYJQFJdtxjyY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1611581871; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Cc:Message-ID:Subject:Date:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=cAPpwspxUMRYLMxOYgtP5Nr+GXLx0YRveoeqjP/TTB4=; b=azYrMg50V74i6Mq1LfWtNsY3XnULIpJHr1z7Ow5Veug1RYS58s1+iPpYcRi2V4LA mOSaLssudN9ziZ/Z9xpaRI9jhbEw5lMeRGIxxP7/MyAdd+tqH734jTg//TWkUAER6Db zLYEfZK6STxuv6N8bUHFbECM6G2cvqmO7sTvPsyQ= Received: from localhost (p54ad4ec7.dip0.t-ipconnect.de [84.173.78.199]) by mx.zohomail.com with SMTPS id 1611581868760918.1867490546068; Mon, 25 Jan 2021 05:37:48 -0800 (PST) From: Ricardo Wurmus To: 46100@debbugs.gnu.org, guix-patches@gnu.org Message-ID: <20210125133738.15609-2-rekado@elephly.net> Subject: [PATCH 2/4] inferior: Memoize inferior-package->manifest-entry. Date: Mon, 25 Jan 2021 14:37:36 +0100 X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210125133738.15609-1-rekado@elephly.net> References: <20210125133738.15609-1-rekado@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46100 Cc: Ricardo Wurmus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/inferior.scm (inferior-package->manifest-entry): Memoize. --- guix/inferior.scm | 55 ++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/guix/inferior.scm b/guix/inferior.scm index da6983d9a6..7bfce5d810 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2018, 2019, 2020 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2021 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -639,31 +640,35 @@ failing when GUIX is too old and lacks the 'guix repl= ' command." ;;; Manifest entries. ;;; =20 -(define* (inferior-package->manifest-entry package - #:optional (output "out") - #:key (parent (delay #f)) - (properties '())) - "Return a manifest entry for the OUTPUT of package PACKAGE." - ;; For each dependency, keep a promise pointing to its "parent" entry. - (letrec* ((deps (map (match-lambda - ((label package) - (inferior-package->manifest-entry package - #:parent (del= ay entry))) - ((label package output) - (inferior-package->manifest-entry package outpu= t - #:parent (del= ay entry)))) - (inferior-package-propagated-inputs package))) - (entry (manifest-entry - (name (inferior-package-name package)) - (version (inferior-package-version package)) - (output output) - (item package) - (dependencies (delete-duplicates deps)) - (search-paths - (inferior-package-transitive-native-search-paths pac= kage)) - (parent parent) - (properties properties)))) - entry)) +(define inferior-package->manifest-entry + (let ((results vlist-null)) + (lambda* (package #:optional (output "out") + #:key (parent (delay #f)) + (properties '())) + "Return a manifest entry for the OUTPUT of package PACKAGE." + (or (and=3D> (vhash-assoc package results) cdr) + ;; For each dependency, keep a promise pointing to its "parent" = entry. + (letrec* ((deps (map (match-lambda + ((label package) + (inferior-package->manifest-entry packa= ge + #:par= ent (delay entry))) + ((label package output) + (inferior-package->manifest-entry packa= ge output + #:par= ent (delay entry)))) + (inferior-package-propagated-inputs packag= e))) + (entry (manifest-entry + (name (inferior-package-name package)) + (version (inferior-package-version package)) + (output output) + (item package) + (dependencies (delete-duplicates deps)) + (search-paths + (inferior-package-transitive-native-search-p= aths package)) + (parent parent) + (properties properties)))) + (begin + (set! results (vhash-cons package entry results)) + entry)))))) =20 =0C ;;; --=20 2.29.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 25 08:38:05 2021 Received: (at 46100) by debbugs.gnu.org; 25 Jan 2021 13:38:05 +0000 Received: from localhost ([127.0.0.1]:38247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l424D-0001vr-1K for submit@debbugs.gnu.org; Mon, 25 Jan 2021 08:38:05 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21111) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l424A-0001v1-Ud for 46100@debbugs.gnu.org; Mon, 25 Jan 2021 08:38:03 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1611581875; cv=none; d=zohomail.com; s=zohoarc; b=nc5AEciNdvs5xK5c/8lNVw11qA3/5PngPAHJ5iX2tXe/BreS2ZsvCyWScBFgAxJVN50PMFZ1p9sqdOv2sbDtSvbNWj+Y90sM3SmdjmOtG7+ZtfNcdjSIBmzyjiIKhs6dEGeAJIyaeQquA/Dzs6eBkRZcG7N+ovM8NAzFnzw+uQc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611581875; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=OA/Bh6Hl4/PIxHtpZEs7jz/FNcsenzfolLCuCE5k+fc=; b=G1epHyWLJZKlmbwzhEVuVrbrMyVBRmBuzCulXbkOKGZzIkiRpzfawdRe18C5uUIDiNhd6hd/giGZI8kEZ9kmS3qy2TBwG8LFhl+vfIm3GfCtbr2JreGyq54RaUvWHzSX8kdbM65x7G1xacqePDQi9DwH+qArtzeITMi2EDmq4cY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1611581875; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Cc:Message-ID:Subject:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type; bh=OA/Bh6Hl4/PIxHtpZEs7jz/FNcsenzfolLCuCE5k+fc=; b=aONhdJKjKSx/RTR1Q41r8hEx87V8xund1kLxPJiwpiK+3zVAX5gLSfNwAbtJkPaF R3GQTJd5AYcYtPpMnMKPjNdp9jziVd9RerN4afLLrGRT7DGJNB2928EKATLE48gxXzk zKgKw32g4ekBeTpU9J5tAoltOic7T8jNquNljNAs= Received: from localhost (p54ad4ec7.dip0.t-ipconnect.de [84.173.78.199]) by mx.zohomail.com with SMTPS id 1611581873054657.0029672331033; Mon, 25 Jan 2021 05:37:53 -0800 (PST) From: Ricardo Wurmus To: 46100@debbugs.gnu.org, guix-patches@gnu.org Message-ID: <20210125133738.15609-3-rekado@elephly.net> Subject: [PATCH 3/4] inferior: Memoize inferior package search path access. Date: Mon, 25 Jan 2021 14:37:37 +0100 X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210125133738.15609-1-rekado@elephly.net> References: <20210125133738.15609-1-rekado@elephly.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset=utf8 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46100 Cc: Ricardo Wurmus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/inferior.scm (%inferior-package-search-paths): Return memoized procedure accepting a package. (inferior-package-native-search-paths, inferior-package-search-paths, inferior-package-transitive-native-search-paths): Adapt. --- guix/inferior.scm | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/guix/inferior.scm b/guix/inferior.scm index 7bfce5d810..0c85a9ea08 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -45,6 +45,7 @@ #:use-module (guix store) #:use-module (guix derivations) #:use-module (guix base32) + #:use-module ((guix memoization) #:select (mlambdaq)) #:use-module (gcrypt hash) #:autoload (guix cache) (maybe-remove-expired-cache-entries file-expiration-time) @@ -430,27 +431,28 @@ inferior package." (define inferior-package-transitive-propagated-inputs (cut inferior-package-input-field <> 'package-transitive-propagated-inpu= ts)) =20 -(define (%inferior-package-search-paths package field) +(define (%inferior-package-search-paths field) "Return the list of search path specifications of PACKAGE, an inferior package." - (define paths - (inferior-package-field package - `(compose (lambda (paths) - (map (@ (guix search-paths) - search-path-specification-= >sexp) - paths)) - ,field))) + (mlambdaq (package) + (define paths + (inferior-package-field package + `(compose (lambda (paths) + (map (@ (guix search-paths) + search-path-specificatio= n->sexp) + paths)) + ,field))) =20 - (map sexp->search-path-specification paths)) + (map sexp->search-path-specification paths))) =20 (define inferior-package-native-search-paths - (cut %inferior-package-search-paths <> 'package-native-search-paths)) + (%inferior-package-search-paths 'package-native-search-paths)) =20 (define inferior-package-search-paths - (cut %inferior-package-search-paths <> 'package-search-paths)) + (%inferior-package-search-paths 'package-search-paths)) =20 (define inferior-package-transitive-native-search-paths - (cut %inferior-package-search-paths <> 'package-transitive-native-search= -paths)) + (%inferior-package-search-paths 'package-transitive-native-search-paths)= ) =20 (define (inferior-package-provenance package) "Return a \"provenance sexp\" for PACKAGE, an inferior package. The res= ult --=20 2.29.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 25 08:38:13 2021 Received: (at 46100) by debbugs.gnu.org; 25 Jan 2021 13:38:13 +0000 Received: from localhost ([127.0.0.1]:38255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l424L-0001wt-2s for submit@debbugs.gnu.org; Mon, 25 Jan 2021 08:38:13 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l424G-0001wQ-IY for 46100@debbugs.gnu.org; Mon, 25 Jan 2021 08:38:09 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1611581879; cv=none; d=zohomail.com; s=zohoarc; b=m9C4L6nK9hU/pb155aU5PQvCmFlQXkUqzGXcwf1eP69zTxW+CzoAwfXZzrGKkJJ4BT6pPkjTOXpfPguX8L9l/kuFEaQwpwQF3uUJI03UbIVG5PD786cqFrZMWwhkjcAsrh7Ckit0szFxHCl0wogRfuGe1AE9aUDJ5O+PcGPHIs8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611581879; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=8kTEVM6w1p3TWeNXVVkIWF7+WBNaws/XuAlHfHtOZgc=; b=aicLLtD6Gnio8b7646Bd+sdarRxzuv5jBQ4e8nBUw6bQQ+SCWaazYv3LeXWAGYE9PfnTQDZ268k3HMhppLXJKf71M2M7ZvKJ9fcZdT/9F0FBXBd7e/yKhn37Eh4aUsE3+kGYAH9Wa+auQxHwRC6dSAxsmo+L4bw0eX3hvec6r+I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1611581879; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Cc:Message-ID:Subject:Date:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=8kTEVM6w1p3TWeNXVVkIWF7+WBNaws/XuAlHfHtOZgc=; b=ZnmrWgUJCaMeZhXNUbi2e2zqovFJiGj9FxCDxTELCijk76T7r6pOfpROe5m6RIXS TGzyqvy8tv0Aa32oGEwbu7aWEPjmL2GS/LJzx2AlaO5btjR32zJq+WqONn5sYrS+raw nQxaZVFK6O+YI/eCxa2v3J5GZtRo4biYxtPfwuEg= Received: from localhost (p54ad4ec7.dip0.t-ipconnect.de [84.173.78.199]) by mx.zohomail.com with SMTPS id 1611581877141429.7993420843868; Mon, 25 Jan 2021 05:37:57 -0800 (PST) From: Ricardo Wurmus To: 46100@debbugs.gnu.org, guix-patches@gnu.org Message-ID: <20210125133738.15609-4-rekado@elephly.net> Subject: [PATCH 4/4] inferior: Memoize package input field access. Date: Mon, 25 Jan 2021 14:37:38 +0100 X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210125133738.15609-1-rekado@elephly.net> References: <20210125133738.15609-1-rekado@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46100 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) From: Ludovic Court=C3=A8s * guix/inferior.scm (inferior-package-input-field): Return memoized procedu= re accepting a package. (inferior-package-inputs, inferior-package-native-inputs, inferior-package-propagated-inputs, inferior-package-transitive-propagated-inputs): Adapt. --- guix/inferior.scm | 71 ++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/guix/inferior.scm b/guix/inferior.scm index 0c85a9ea08..b5e8939a1d 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright =C2=A9 2018, 2019, 2020 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2018, 2019, 2020, 2021 Ludovic Court=C3=A8s ;;; Copyright =C2=A9 2021 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. @@ -386,50 +386,51 @@ record." loc))) package-location)))) =20 -(define (inferior-package-input-field package field) +(define (inferior-package-input-field field) "Return the input field FIELD (e.g., 'native-inputs') of PACKAGE, an inferior package." - (define field* - `(compose (lambda (inputs) - (map (match-lambda - ;; XXX: Origins are not handled. - ((label (? package? package) rest ...) - (let ((id (object-address package))) - (hashv-set! %package-table id package) - `(,label (package ,id - ,(package-name package) - ,(package-version package)) - ,@rest))) - (x - x)) - inputs)) - ,field)) - - (define inputs - (inferior-package-field package field*)) - - (define inferior - (inferior-package-inferior package)) - - (map (match-lambda - ((label ('package id name version) . rest) - ;; XXX: eq?-ness of inferior packages is not preserved here. - `(,label ,(inferior-package inferior name version id) - ,@rest)) - (x x)) - inputs)) + (mlambdaq (package) + (define field* + `(compose (lambda (inputs) + (map (match-lambda + ;; XXX: Origins are not handled. + ((label (? package? package) rest ...) + (let ((id (object-address package))) + (hashv-set! %package-table id package) + `(,label (package ,id + ,(package-name package) + ,(package-version package)) + ,@rest))) + (x + x)) + inputs)) + ,field)) + + (define inputs + (inferior-package-field package field*)) + + (define inferior + (inferior-package-inferior package)) + + (map (match-lambda + ((label ('package id name version) . rest) + ;; XXX: eq?-ness of inferior packages is not preserved here. + `(,label ,(inferior-package inferior name version id) + ,@rest)) + (x x)) + inputs))) =20 (define inferior-package-inputs - (cut inferior-package-input-field <> 'package-inputs)) + (inferior-package-input-field 'package-inputs)) =20 (define inferior-package-native-inputs - (cut inferior-package-input-field <> 'package-native-inputs)) + (inferior-package-input-field 'package-native-inputs)) =20 (define inferior-package-propagated-inputs - (cut inferior-package-input-field <> 'package-propagated-inputs)) + (inferior-package-input-field 'package-propagated-inputs)) =20 (define inferior-package-transitive-propagated-inputs - (cut inferior-package-input-field <> 'package-transitive-propagated-inpu= ts)) + (inferior-package-input-field 'package-transitive-propagated-inputs)) =20 (define (%inferior-package-search-paths field) "Return the list of search path specifications of PACKAGE, an inferior --=20 2.29.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 26 03:58:14 2021 Received: (at control) by debbugs.gnu.org; 26 Jan 2021 08:58:14 +0000 Received: from localhost ([127.0.0.1]:40713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4KAv-0007xf-RW for submit@debbugs.gnu.org; Tue, 26 Jan 2021 03:58:14 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:21948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4KAu-0007xP-QG for control@debbugs.gnu.org; Tue, 26 Jan 2021 03:58:13 -0500 X-IronPort-AV: E=Sophos;i="5.79,375,1602540000"; d="scan'208";a="489109786" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jan 2021 09:58:06 +0100 Date: Tue, 26 Jan 2021 09:58:05 +0100 Message-Id: <87lfcg13du.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #46100 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) merge 46100 46101 quit From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 26 03:58:55 2021 Received: (at control) by debbugs.gnu.org; 26 Jan 2021 08:58:55 +0000 Received: from localhost ([127.0.0.1]:40716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4KBb-0007yc-42 for submit@debbugs.gnu.org; Tue, 26 Jan 2021 03:58:55 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:21984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4KBZ-0007yR-FF for control@debbugs.gnu.org; Tue, 26 Jan 2021 03:58:53 -0500 X-IronPort-AV: E=Sophos;i="5.79,375,1602540000"; d="scan'208";a="489109817" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jan 2021 09:58:19 +0100 Date: Tue, 26 Jan 2021 09:58:19 +0100 Message-Id: <87k0s013dg.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #46100 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) merge 46100 46102 quit From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 26 05:41:37 2021 Received: (at 46100) by debbugs.gnu.org; 26 Jan 2021 10:41:37 +0000 Received: from localhost ([127.0.0.1]:40812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4Lmy-00049R-MO for submit@debbugs.gnu.org; Tue, 26 Jan 2021 05:41:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4Lmw-00049A-Tm for 46100@debbugs.gnu.org; Tue, 26 Jan 2021 05:41:35 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45264) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4Lmr-00043B-BH; Tue, 26 Jan 2021 05:41:29 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=34806 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l4Lmn-0001iy-SF; Tue, 26 Jan 2021 05:41:27 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Subject: Re: bug#46100: [PATCH 0/4] Memoize inferior package access. References: <20210125133738.15609-1-rekado@elephly.net> <20210125133738.15609-2-rekado@elephly.net> Date: Tue, 26 Jan 2021 11:41:24 +0100 In-Reply-To: <20210125133738.15609-2-rekado@elephly.net> (Ricardo Wurmus's message of "Mon, 25 Jan 2021 14:37:36 +0100") Message-ID: <878s8g0yln.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46100 Cc: 46100@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi! Thanks for digging into this! Ricardo Wurmus skribis: > +(define inferior-package->manifest-entry > + (let ((results vlist-null)) > + (lambda* (package #:optional (output "out") > + #:key (parent (delay #f)) > + (properties '())) > + "Return a manifest entry for the OUTPUT of package PACKAGE." > + (or (and=3D> (vhash-assoc package results) cdr) There=E2=80=99s a catch here: OUTPUT should be taken into account. Also it=E2=80=99s better to use eq?-ness but=E2=80=A6 I realized =E2=80=98inferior-package-inputs=E2=80=99 & co. do not preserve eq?-ness. So I came up with the attached patch, which addresses these two issues. For me the =E2=80=98packages->manifest=E2=80=99 phase goes from 13s to 2.5s= (19s to 4.6s for the whole script), which is still a lot, but that was without the other patches. Thoughts? Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/guix/inferior.scm b/guix/inferior.scm index 2fe91beaab..91bbb5aa70 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -109,13 +109,14 @@ ;; Inferior Guix process. (define-record-type - (inferior pid socket close version packages table) + (inferior pid socket close version packages id-table table) inferior? (pid inferior-pid) (socket inferior-socket) (close inferior-close-socket) ;procedure (version inferior-version) ;REPL protocol version (packages inferior-package-promise) ;promise of inferior packages + (id-table inferior-package-id-table) ;promise of vhash (table inferior-package-table)) ;promise of vhash (define* (inferior-pipe directory command error-port) @@ -160,6 +161,7 @@ inferior." (('repl-version 0 rest ...) (letrec ((result (inferior 'pipe pipe close (cons 0 rest) (delay (%inferior-packages result)) + (delay (%inferior-package-id-table result)) (delay (%inferior-package-table result))))) ;; For protocol (0 1) and later, send the protocol version we support. @@ -295,6 +297,18 @@ Raise '&inferior-exception' when an exception is read from PORT." (inferior-package inferior name version id))) result))) +(define (%inferior-package-id-table inferior) + (fold (lambda (package table) + (vhash-consv (inferior-package-id package) package + table)) + vlist-null + (inferior-packages inferior))) + +(define (lookup-inferior-package-by-id inferior id) + (match (vhash-assv id (force (inferior-package-id-table inferior))) + (#f #f) + ((_ . package) package))) + (define (inferior-packages inferior) "Return the list of packages known to INFERIOR." (force (inferior-package-promise inferior))) @@ -412,8 +426,10 @@ inferior package." (map (match-lambda ((label ('package id name version) . rest) - ;; XXX: eq?-ness of inferior packages is not preserved here. - `(,label ,(inferior-package inferior name version id) + ;; XXX: eq?-ness of inferior packages is preserved, unless the + ;; package is not public. + `(,label ,(or (lookup-inferior-package-by-id inferior id) + (inferior-package inferior name version id)) ,@rest)) (x x)) inputs)) @@ -642,29 +658,50 @@ failing when GUIX is too old and lacks the 'guix repl' command." (define* (inferior-package->manifest-entry package #:optional (output "out") - #:key (parent (delay #f)) - (properties '())) + #:key (properties '())) "Return a manifest entry for the OUTPUT of package PACKAGE." ;; For each dependency, keep a promise pointing to its "parent" entry. - (letrec* ((deps (map (match-lambda - ((label package) - (inferior-package->manifest-entry package - #:parent (delay entry))) - ((label package output) - (inferior-package->manifest-entry package output - #:parent (delay entry)))) - (inferior-package-propagated-inputs package))) - (entry (manifest-entry - (name (inferior-package-name package)) - (version (inferior-package-version package)) - (output output) - (item package) - (dependencies (delete-duplicates deps)) - (search-paths - (inferior-package-transitive-native-search-paths package)) - (parent parent) - (properties properties)))) - entry)) + (define cache + (make-hash-table)) + + (define-syntax-rule (memoized package output exp) + (let ((compute (lambda () exp))) + (match (hashq-ref cache package) + (#f + (let ((result (compute))) + (hashq-set! cache package `((,output . ,result))) + result)) + (alist + (match (assoc-ref alist output) + (#f + (let ((result (compute))) + (hashq-set! cache package + `((, output . ,result) ,@alist)) + result)) + (result + result)))))) + + (let loop ((package package) + (output output) + (parent (delay #f))) + (memoized package output + (letrec* ((deps (map (match-lambda + ((label package) + (loop package "out" (delay entry))) + ((label package output) + (loop package output (delay entry)))) + (inferior-package-propagated-inputs package))) + (entry (manifest-entry + (name (inferior-package-name package)) + (version (inferior-package-version package)) + (output output) + (item package) + (dependencies (delete-duplicates deps)) + (search-paths + (inferior-package-transitive-native-search-paths package)) + (parent parent) + (properties properties)))) + entry)))) ;;; @@ -750,3 +787,7 @@ This is a convenience procedure that people may use in manifests passed to #:cache-directory cache-directory #:ttl ttl))) (open-inferior cached)) + +;;; Local Variables: +;;; eval: (put 'memoized 'scheme-indent-function 1) +;;; End: diff --git a/tests/inferior.scm b/tests/inferior.scm index 7c3d730d0c..ddfae8236d 100644 --- a/tests/inferior.scm +++ b/tests/inferior.scm @@ -195,6 +195,25 @@ (close-inferior inferior) result)) +(test-assert "inferior-package-inputs & pointer identity" + (let* ((inferior (open-inferior %top-builddir + #:command "scripts/guix")) + (lookup (lambda (name) + (first (lookup-inferior-packages inferior name)))) + (guile-gcrypt (lookup "guile-gcrypt")) + (libgcrypt (lookup "libgcrypt")) + (pkg-config (lookup "pkg-config"))) + (define (input name) + (match (assoc name (inferior-package-inputs guile-gcrypt)) + ((label package . _) package))) + + (and (eq? libgcrypt + (car (assoc-ref (inferior-package-inputs guile-gcrypt) + "libgcrypt"))) + (eq? pkg-config + (car (assoc-ref (inferior-package-native-inputs guile-gcrypt) + "pkg-config")))))) + (test-equal "inferior-package-search-paths" (package-native-search-paths guile-3.0) (let* ((inferior (open-inferior %top-builddir --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 26 06:30:49 2021 Received: (at 46100) by debbugs.gnu.org; 26 Jan 2021 11:30:49 +0000 Received: from localhost ([127.0.0.1]:40887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4MYa-0005YP-Kf for submit@debbugs.gnu.org; Tue, 26 Jan 2021 06:30:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4MYW-0005Y9-Mj for 46100@debbugs.gnu.org; Tue, 26 Jan 2021 06:30:46 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46161) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4MYQ-0004Tq-9u; Tue, 26 Jan 2021 06:30:38 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35696 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l4MYP-0004IL-0E; Tue, 26 Jan 2021 06:30:37 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Subject: Re: bug#46100: [PATCH 0/4] Memoize inferior package access. References: <20210125133738.15609-1-rekado@elephly.net> <20210125133738.15609-2-rekado@elephly.net> <878s8g0yln.fsf_-_@gnu.org> Date: Tue, 26 Jan 2021 12:30:34 +0100 In-Reply-To: <878s8g0yln.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Tue, 26 Jan 2021 11:41:24 +0100") Message-ID: <874kj40wbp.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46100 Cc: 46100@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s skribis: > There=E2=80=99s a catch here: OUTPUT should be taken into account. > > Also it=E2=80=99s better to use eq?-ness but=E2=80=A6 I realized > =E2=80=98inferior-package-inputs=E2=80=99 & co. do not preserve eq?-ness. I think I went overboard here: given that is a simple flat record type, using =E2=80=98equal?=E2=80=99/=E2=80=98hash-ref=E2=80=99= is reasonable and that way we avoid the troubles of building an ID-to-package table. All in all it=E2=80=99s slightly more efficient. WDYT? Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/guix/inferior.scm b/guix/inferior.scm index 2fe91beaab..d813b3b918 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -642,29 +642,41 @@ failing when GUIX is too old and lacks the 'guix repl' command." (define* (inferior-package->manifest-entry package #:optional (output "out") - #:key (parent (delay #f)) - (properties '())) + #:key (properties '())) "Return a manifest entry for the OUTPUT of package PACKAGE." ;; For each dependency, keep a promise pointing to its "parent" entry. - (letrec* ((deps (map (match-lambda - ((label package) - (inferior-package->manifest-entry package - #:parent (delay entry))) - ((label package output) - (inferior-package->manifest-entry package output - #:parent (delay entry)))) - (inferior-package-propagated-inputs package))) - (entry (manifest-entry - (name (inferior-package-name package)) - (version (inferior-package-version package)) - (output output) - (item package) - (dependencies (delete-duplicates deps)) - (search-paths - (inferior-package-transitive-native-search-paths package)) - (parent parent) - (properties properties)))) - entry)) + (define cache + (make-hash-table)) + + (define-syntax-rule (memoized package output exp) + (let ((compute (lambda () exp)) + (key (cons package output))) + (or (hash-ref cache key) + (let ((result (compute))) + (hash-set! cache key result) + result)))) + + (let loop ((package package) + (output output) + (parent (delay #f))) + (memoized package output + (letrec* ((deps (map (match-lambda + ((label package) + (loop package "out" (delay entry))) + ((label package output) + (loop package output (delay entry)))) + (inferior-package-propagated-inputs package))) + (entry (manifest-entry + (name (inferior-package-name package)) + (version (inferior-package-version package)) + (output output) + (item package) + (dependencies (delete-duplicates deps)) + (search-paths + (inferior-package-transitive-native-search-paths package)) + (parent parent) + (properties properties)))) + entry)))) ;;; @@ -750,3 +762,7 @@ This is a convenience procedure that people may use in manifests passed to #:cache-directory cache-directory #:ttl ttl))) (open-inferior cached)) + +;;; Local Variables: +;;; eval: (put 'memoized 'scheme-indent-function 1) +;;; End: --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 26 07:38:25 2021 Received: (at 46100) by debbugs.gnu.org; 26 Jan 2021 12:38:25 +0000 Received: from localhost ([127.0.0.1]:40961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4Nc1-0000pc-3x for submit@debbugs.gnu.org; Tue, 26 Jan 2021 07:38:25 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4Nbz-0000pT-9f for 46100@debbugs.gnu.org; Tue, 26 Jan 2021 07:38:23 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1611664696; cv=none; d=zohomail.com; s=zohoarc; b=RLVh8c7aGGAoSFAkwzNvmzAlQAJAnw+l7msTdXFSiLBR/wJijr/rf9Q/Ls6SI73L0WI0df1wGXlvTpSXzVqHjSPq8XjbBHe5vsqKOycve0VnVrd7nvYENSc66df5lB3en5j3oWhYgJQBRsdTeAaLWP9xKQQtslq/Me+YsVu1LQY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611664696; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=sTrRgChdcristXxMArNGLoIPxQBf/e3cR26c5AR9iE0=; b=fpZw0cDwFQ2T77n17IjobhTkNZ/qDgKEjDTSIm+QHCuGp3ulCWxUPIbE8TkJZx6Ub6YXL9m67WpMhAaAX2HTB6J/jF5N6isV9ip+INMdUOF17LlIoN17HCIPR/Du0x7NsW6cowwOG+x438luHohBYbbl1Z/5J0s/4lTPojkzF/4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1611664696; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=sTrRgChdcristXxMArNGLoIPxQBf/e3cR26c5AR9iE0=; b=g8zhBEWF1oqvO13ilSpcWgb4jWjNWtsIm5G9xMDrgOgK1BIqeBrVf9l1hRrKUKzO INYv69HsjppuMcXVVrnFB71YffpmMSaqjD/uWtkBKw6KERInIpBBoe8LheCmndx7+BO QjlWlOCPg2qGVctH8guqU7E2FL/vYFRyjDdsMBiI= Received: from localhost (p54ad4e0d.dip0.t-ipconnect.de [84.173.78.13]) by mx.zohomail.com with SMTPS id 1611664694466168.85463198854302; Tue, 26 Jan 2021 04:38:14 -0800 (PST) References: <20210125133738.15609-1-rekado@elephly.net> <20210125133738.15609-2-rekado@elephly.net> <878s8g0yln.fsf_-_@gnu.org> <874kj40wbp.fsf_-_@gnu.org> User-agent: mu4e 1.4.13; emacs 27.1 From: Ricardo Wurmus To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#46100: [PATCH 0/4] Memoize inferior package access. In-reply-to: <874kj40wbp.fsf_-_@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Tue, 26 Jan 2021 13:38:11 +0100 Message-ID: <87y2gfj2ks.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46100 Cc: 46100@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: > Ludovic Court=C3=A8s skribis: > >> There=E2=80=99s a catch here: OUTPUT should be taken into account. >> >> Also it=E2=80=99s better to use eq?-ness but=E2=80=A6 I realized >> =E2=80=98inferior-package-inputs=E2=80=99 & co. do not preserve eq?-ness. > > I think I went overboard here: given that is a simple > flat record type, using =E2=80=98equal?=E2=80=99/=E2=80=98hash-ref=E2=80= =99 is reasonable and that way > we avoid the troubles of building an ID-to-package table. All in all > it=E2=80=99s slightly more efficient. This looks good to me. It is very similar to my first version (which I didn=E2=80=99t send to the list), which also built a key consisting of the arguments to inferior-package->manifest-entry =E2=80=94 I wasn=E2=80=99t sure which of t= hem was important so I used them all instead of just consing package and output. I also like the use of define-syntax-rule to make it all look neater. --=20 Ricardo From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 27 18:18:18 2021 Received: (at 46100) by debbugs.gnu.org; 27 Jan 2021 23:18:18 +0000 Received: from localhost ([127.0.0.1]:46444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4u4o-0002Fu-0I for submit@debbugs.gnu.org; Wed, 27 Jan 2021 18:18:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4u4l-0002Fi-Tc for 46100@debbugs.gnu.org; Wed, 27 Jan 2021 18:18:16 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57349) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4u4g-0005mq-GA; Wed, 27 Jan 2021 18:18:10 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=55806 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l4u4g-0005x6-00; Wed, 27 Jan 2021 18:18:10 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Subject: Re: bug#46100: [PATCH 0/4] Memoize inferior package access. References: <20210125133738.15609-1-rekado@elephly.net> <20210125133738.15609-2-rekado@elephly.net> <878s8g0yln.fsf_-_@gnu.org> <874kj40wbp.fsf_-_@gnu.org> <87y2gfj2ks.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 =?utf-8?Q?Pluvi=C3=B4se?= an 229 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 28 Jan 2021 00:18:08 +0100 In-Reply-To: <87y2gfj2ks.fsf@elephly.net> (Ricardo Wurmus's message of "Tue, 26 Jan 2021 13:38:11 +0100") Message-ID: <87sg6mrmtr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46100 Cc: 46100@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ricardo Wurmus skribis: > Ludovic Court=C3=A8s writes: > >> Ludovic Court=C3=A8s skribis: >> >>> There=E2=80=99s a catch here: OUTPUT should be taken into account. >>> >>> Also it=E2=80=99s better to use eq?-ness but=E2=80=A6 I realized >>> =E2=80=98inferior-package-inputs=E2=80=99 & co. do not preserve eq?-nes= s. >> >> I think I went overboard here: given that is a simple >> flat record type, using =E2=80=98equal?=E2=80=99/=E2=80=98hash-ref=E2=80= =99 is reasonable and that way >> we avoid the troubles of building an ID-to-package table. All in all >> it=E2=80=99s slightly more efficient. > > This looks good to me. > > It is very similar to my first version (which I didn=E2=80=99t send to the > list), which also built a key consisting of the arguments to > inferior-package->manifest-entry =E2=80=94 I wasn=E2=80=99t sure which of= them was > important so I used them all instead of just consing package and > output. > > I also like the use of define-syntax-rule to make it all look neater. I pushed it as 0f20b3fa2050ba6e442e340a204516b9375cd231. I wonder if the other patches improve the situation. If you run the same test case with: GUIX_PROFILING=3Dmemoization what hit rates does it show for these spots? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 28 06:53:40 2021 Received: (at 46100) by debbugs.gnu.org; 28 Jan 2021 11:53:40 +0000 Received: from localhost ([127.0.0.1]:47424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l55rn-0000Jh-RB for submit@debbugs.gnu.org; Thu, 28 Jan 2021 06:53:40 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l55ra-0000JL-J5 for 46100@debbugs.gnu.org; Thu, 28 Jan 2021 06:53:27 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1611834798; cv=none; d=zohomail.com; s=zohoarc; b=YvGk+l5BIdmtgJC3PivXd+TpChRXPlTOUVShnzta4Z0XPZ+QRh5Q9GpQKV5nRrUuWUPPN9irZijAvIEhI4toMDsGPHG3r2uHbKIIe6uximecoqd3mIwQjV2sG4Rt1JvDzNAAnjLpdpDgdyftM7ViQw4CpGn+TyEvOTXg3ykBr0w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611834798; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=7Q4md1eZUW774FEz96oyRqxgiCUWBnDR9KY4gZ7RzJo=; b=e7ABIV6sqasKK6cEkdbDaNAeY/Tsp8j3a7/29h9oneJCnNZ2+HO6zBf5nG8PycCmDhaGthvAf6TR1krM4CaWUjrW4ibE74ziJMs0O2ngqbrUwwCXkYkUiL4aglv+IRDqWiPmcC4xw3+URgXkrq9JQumeeMXlku1MEJBf9IVVdP4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1611834798; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=7Q4md1eZUW774FEz96oyRqxgiCUWBnDR9KY4gZ7RzJo=; b=AimJG4gP7kH1c0zEQYloxEaVFUlWNWAIZGKkgqkP6d3sIgqqZHXW9WWeMDAB4JVj IlzNe40CWQCPhBNuvg4oVb42aJ/kH7VauDCqgu1MhUlsAhdT0HfyQVi2NP3dkdBjQKs eOZUA1BmMDK7Mgyz+KPbLzljGOuyRSpR/vLqx89g= Received: from localhost (p54ad4fb2.dip0.t-ipconnect.de [84.173.79.178]) by mx.zohomail.com with SMTPS id 1611834796276426.2873760675275; Thu, 28 Jan 2021 03:53:16 -0800 (PST) References: <20210125133738.15609-1-rekado@elephly.net> <20210125133738.15609-2-rekado@elephly.net> <878s8g0yln.fsf_-_@gnu.org> <874kj40wbp.fsf_-_@gnu.org> <87y2gfj2ks.fsf@elephly.net> <87sg6mrmtr.fsf@gnu.org> User-agent: mu4e 1.4.13; emacs 27.1 From: Ricardo Wurmus To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#46100: [PATCH 0/4] Memoize inferior package access. In-reply-to: <87sg6mrmtr.fsf@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Thu, 28 Jan 2021 12:53:12 +0100 Message-ID: <87tur1i8gn.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46100 Cc: 46100@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: > I pushed it as 0f20b3fa2050ba6e442e340a204516b9375cd231. Thanks! > I wonder if the other patches improve the situation. If you run the > same test case with: > > GUIX_PROFILING=3Dmemoization > > what hit rates does it show for these spots? Memoization: 15 tables, 2 non-empty guix/inferior.scm:438:2: 403 entries, 403 lookups, 0% hits guix/inferior.scm:392:2: 403 entries, 403 lookups, 0% hits So, I guess we can drop those two patches. --=20 Ricardo From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 28 08:16:57 2021 Received: (at 46100-done) by debbugs.gnu.org; 28 Jan 2021 13:16:57 +0000 Received: from localhost ([127.0.0.1]:47540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l57AO-0006XU-Nl for submit@debbugs.gnu.org; Thu, 28 Jan 2021 08:16:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l57AM-0006XE-IK for 46100-done@debbugs.gnu.org; Thu, 28 Jan 2021 08:16:55 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41754) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l57AH-00049H-Ac; Thu, 28 Jan 2021 08:16:49 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=58078 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l57AG-0004ms-LJ; Thu, 28 Jan 2021 08:16:49 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Subject: Re: bug#46100: [PATCH 0/4] Memoize inferior package access. References: <20210125133738.15609-1-rekado@elephly.net> <20210125133738.15609-2-rekado@elephly.net> <878s8g0yln.fsf_-_@gnu.org> <874kj40wbp.fsf_-_@gnu.org> <87y2gfj2ks.fsf@elephly.net> <87sg6mrmtr.fsf@gnu.org> <87tur1i8gn.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 =?utf-8?Q?Pluvi=C3=B4se?= an 229 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 28 Jan 2021 14:16:47 +0100 In-Reply-To: <87tur1i8gn.fsf@elephly.net> (Ricardo Wurmus's message of "Thu, 28 Jan 2021 12:53:12 +0100") Message-ID: <8735ylqk00.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46100-done Cc: 46100-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ricardo Wurmus skribis: > Ludovic Court=C3=A8s writes: > >> I pushed it as 0f20b3fa2050ba6e442e340a204516b9375cd231. > > Thanks! > >> I wonder if the other patches improve the situation. If you run the >> same test case with: >> >> GUIX_PROFILING=3Dmemoization >> >> what hit rates does it show for these spots? > > Memoization: 15 tables, 2 non-empty > guix/inferior.scm:438:2: 403 entries, 403 lookups, 0% hits > guix/inferior.scm:392:2: 403 entries, 403 lookups, 0% hits > > So, I guess we can drop those two patches. Looks like it. :-) Closing! Thanks, Ludo=E2=80=99. From unknown Fri Aug 15 12:52:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 26 Feb 2021 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator