From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:700:3204::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id oLVtBepJnGUdcgAAkFu2QA (envelope-from ) for ; Mon, 08 Jan 2024 20:15:54 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id SKvEOOlJnGW4WQEAe85BDQ (envelope-from ) for ; Mon, 08 Jan 2024 20:15:54 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; 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=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704741017; 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: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; bh=6V0YU0g1GGPiRSWtGMseF6mlLZUMtkqz46nT6iyxN5w=; b=qu1Xq4Ha/J7LqcLRcS2Z/iur/z1vB/jrFWjSK4sjTyY+ohUkDN498hQm2YwyfAhyEmQA/F VRdgdOAWqKNSSztC9acp93qFCv5HZIsa7fTxr62rNwX0EdyDndHi1UglLtSSTXkp/WylF5 DZCCnvgONlCWj0ZAbPBQwlB0heMtbiKpRzIX3Mm0ucZR3x6xVdcwuiwP2DZu/TW1wXPjG8 rMX20lPHjliFb3PgoeGljvudyk8k6Qa65d2NvRowO127Hq2RBIa2Ep/PkMu1e3dyB2FOXz 98KlL2xj22+aLtwqGCpDAf4vdf9Qkt8RSIzuCBy/5+zumHmVaFcqqGyD2lkv/A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704741017; a=rsa-sha256; cv=none; b=V4an/KCFLoQpiNVrngpgmuR2931rzPFZPzbhspsj9y4GxM7stHdKJwJ2cUOrBUNOzRYN9V lJlVJDsmqqbJM5HJDb3yGEYnWzSTb7X6WfYYx+fWveKgX51zPKtuEqG9dgoL9eqdNtPljT NhI7Pn8V1JwSOI41NzueU+vk2t13TgEDX+XEQTysQZ4Ba7vrIg+7fKFAdqT3GSqGcvmqZk p+swExCVqhA4efXX0AZf+sOfT8IPQDSKt7t4B6Sox4TRTNTig0/hmQSosxnkmmHcBk242p Nhooj4z0M//WTriDhjfLNC4Vg//G4UHMxPq/TesdTzp0CcjC9tl45YBCOexyOQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=none 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 4BECD70A39 for ; Mon, 8 Jan 2024 20:10:16 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMv0Z-0002bD-6x; Mon, 08 Jan 2024 14:09:59 -0500 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 1rMv0W-0002ZV-On for guix-patches@gnu.org; Mon, 08 Jan 2024 14:09:56 -0500 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 1rMv0W-0004Sy-6M for guix-patches@gnu.org; Mon, 08 Jan 2024 14:09:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rMv0c-0005nS-7y for guix-patches@gnu.org; Mon, 08 Jan 2024 14:10:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68266] [PATCH 1/7] gnu: Memozise make-ld-wrapper results. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Jan 2024 19:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68266 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 68266@debbugs.gnu.org Received: via spool by 68266-submit@debbugs.gnu.org id=B68266.170474100122277 (code B ref 68266); Mon, 08 Jan 2024 19:10:02 +0000 Received: (at 68266) by debbugs.gnu.org; 8 Jan 2024 19:10:01 +0000 Received: from localhost ([127.0.0.1]:37587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMv0a-0005n8-0c for submit@debbugs.gnu.org; Mon, 08 Jan 2024 14:10:01 -0500 Received: from mira.cbaines.net ([212.71.252.8]:43072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMv0U-0005mx-Vu for 68266@debbugs.gnu.org; Mon, 08 Jan 2024 14:09:58 -0500 Received: from localhost (unknown [217.155.61.229]) by mira.cbaines.net (Postfix) with ESMTPSA id 1DBD827BBE2; Mon, 8 Jan 2024 19:09:47 +0000 (GMT) Received: from felis (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 2dc91849; Mon, 8 Jan 2024 19:09:45 +0000 (UTC) References: <87plyfrb2x.fsf@cbaines.net> <13f83a0db585e81572240e35dfef473aa73fe996.1704472849.git.mail@cbaines.net> <87v8833fl7.fsf@gnu.org> User-agent: mu4e 1.10.7; emacs 29.1 From: Christopher Baines Date: Mon, 08 Jan 2024 19:01:58 +0000 In-reply-to: <87v8833fl7.fsf@gnu.org> Message-ID: <878r4zr6a0.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 4BECD70A39 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -8.41 X-Spam-Score: -8.41 X-TUID: rVCyD6jF5Ak+ --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hi, > > Christopher Baines skribis: > >> To ensure that it just returns a single package record for some given >> arguments, as this helps to avoid poor performance of the store connecti= on >> object cache. >> >> * gnu/packages/base.scm (make-ld-wrapper): Move code to >> make-ld-wrapper/implementation and call it. >> (make-ld-wrapper/implementation) New procedure. >> >> Change-Id: Id6fc805a4a7ffbc5ff0a5174eafcdf2c7c46854d > > Do you have figures before and after the change? > > The reason I=E2=80=99m asking is that (gnu packages commencement) arrange= s to > not call =E2=80=98make-ld-wrapper=E2=80=99 repeatedly already. For insta= nce, there=E2=80=99s: > > (define-public ld-wrapper > ;; The final 'ld' wrapper, which uses the final Guile and Binutils. > (make-ld-wrapper "ld-wrapper" > #:binutils binutils-final > #:guile guile-final > #:bash bash-final)) > > and from there on we manipulate a single record. I believe the reason packages from make-ld-wrapper were showing up multiple times in the cache for me is linked to it's use in the cross-base module, as part of the cross-gcc procedure. A later commit does change cross-gcc to return a single package record for some given arguments, so that probably resolves the biggest misuse of make-ld-wrapper. I think there's other cases (in the llvm and mold modules) where it looks like it's called multiple times with the same arguments, so maybe that's an argument for having memoization around make-ld-wrapper even though it's not needed for all uses. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmWcSHdfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XfZVQ/9EnUCnl48GyAQxKQWWzWUsNcacRgB7HVD teI7hKFAosZgzESSux7GKzZJDHS9YqR9qWgnfZlE9+/zYt7rIGsp7pAZrAolVR36 h7D72J1gS78wlowUQRSCUWNgp+Un2KJM2HyI+cm5dRap8BTeZQVH0vygVH+Z39vx k07N3wjeyr+FYhnwW2SN+DCKi+9tkswMeWkNUPgcSbFUIK0V+D/o6f4fFgkmnHAF lbY2N9RgBjlc4cKJPvD63iGgxXWJE7u89kfGKgj9+x8CHjRw12eU02r2gzpsjsdA JYD/gCP6oHPbpxtl3YLgL/6SzrN9G/aCLSZuxmsaRW7XrvZlofjvdHViiu9SoCXT 6053TPL9DiuRmF+CZMYfplP8Wct/SMS45S/kYAcJjKZIWSB0xuuuwN+JMoJJwSr5 6p2W0/wzMqvqEJYELvO9ZwkA30XfxwxRJK3Fh8HbjPVqpo8Fm2qL5h4TAHkuW/xv BL2rjBNDAP6KovnRpcYBtsFo7q6PGkuw6mD9wOjXeNKF/JICLlrptMGhH+c0ML2L QCZiAQgTlkjEGh3Udq9teWRY7LZvkW3TuxCs0gphs+ImUY6KkaQt0H7frh0O1tlZ KDLBM8svs5OSAQM3cWSDXV+yqR2dWDaG3B7mVykhzyJKHbx8I6ex7jG5mEYnyH2O Jx4Ed8eVBUI= =G7+r -----END PGP SIGNATURE----- --=-=-=--