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 IEV7C2h/oWXHuQAAkFu2QA (envelope-from ) for ; Fri, 12 Jan 2024 19:05:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id gC4sB2h/oWXS1AAAe85BDQ (envelope-from ) for ; Fri, 12 Jan 2024 19:05:28 +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=1705082727; 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=AMG8mxhQRpTml1zrM4pEPANiRCi8W+VGnBnrOwvkU3o=; b=dkXuij7Q48QgH9HT/vvMHbbkLdxj5hNwAWWn4mlizwH76aLlpEYhPNvOR2ae1rtg5Sn4oU dDY6QjiJcaNGxUrs9TKyJcEp8prK/mlcL2yWYM1j1oH44lEZgt76Sq6yhClkctk0N+/dy6 yZvUGql4lzcQBn8tkgyOv0h9yWFiQa3tkHeGEdBrfeumpNmP7AdSccrmizKiyEga+sNgEw 9tiHZDqvjhU4UFpPNgGu0WgawWy7vozHJ4m6hqvaa7njZHLE2hqzL83XFmGzVEbPwu/CHM Gg3wYtp7bc7qPVt8VolRDgtl0H1NfsNAH+CQJlcjqlmpqVHQ8TJHGQ+8i0Ct2A== 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705082727; a=rsa-sha256; cv=none; b=I9orJaZ8plkh7RSCguV/VkcKi+jIr1bwqdeJ3+meSywiXBkzQ7aygd+NI5TlxLKpTObiMv /0r+GLflbM6N3841Za6COJnU1s7NFTcD+szwHrffgCU0PBaSLlJdj+uTzsqLzJcdKBqQdR E2wr21KvSqy54QJ1OhHAKk7ClPLs5tkfGb9Ohcr1EfNH/lLHe+HGRiT7F8dLlv0n1RQER1 6O87hHUksNL1zzIiKJzzvNT3Ze9R3xu8KhDuJczSs8ac6WejWBQUzZfHn13/ugr6Epy2Pd IJF5cm8ECC7YojdM5Yw4nCG04KQ3vu0/tpjLdc4F+H64x+iBL8ZfX78ILyCSYQ== 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 D07D13F1BB for ; Fri, 12 Jan 2024 19:05:27 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rOLtz-0004zB-0y; Fri, 12 Jan 2024 13:05:07 -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 1rOLtw-0004wu-AH for guix-patches@gnu.org; Fri, 12 Jan 2024 13:05:05 -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 1rOLtw-0004uh-0h for guix-patches@gnu.org; Fri, 12 Jan 2024 13:05:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rOLtu-0002kq-1E for guix-patches@gnu.org; Fri, 12 Jan 2024 13:05:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68266] [PATCH 7/7] packages: rust: Memoize make-rust-sysroot results. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 12 Jan 2024 18:05:01 +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: Efraim Flashner , 68266@debbugs.gnu.org Received: via spool by 68266-submit@debbugs.gnu.org id=B68266.170508266210509 (code B ref 68266); Fri, 12 Jan 2024 18:05:01 +0000 Received: (at 68266) by debbugs.gnu.org; 12 Jan 2024 18:04:22 +0000 Received: from localhost ([127.0.0.1]:37689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOLtG-0002jR-Dd for submit@debbugs.gnu.org; Fri, 12 Jan 2024 13:04:22 -0500 Received: from mira.cbaines.net ([212.71.252.8]:43098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOLtE-0002jF-MQ for 68266@debbugs.gnu.org; Fri, 12 Jan 2024 13:04:21 -0500 Received: from localhost (unknown [217.155.61.229]) by mira.cbaines.net (Postfix) with ESMTPSA id 3F89027BBE2; Fri, 12 Jan 2024 18:04:21 +0000 (GMT) Received: from felis (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id a7995c2e; Fri, 12 Jan 2024 18:04:20 +0000 (UTC) References: <13f83a0db585e81572240e35dfef473aa73fe996.1704472849.git.mail@cbaines.net> <878r4uk5c7.fsf@gnu.org> User-agent: mu4e 1.10.7; emacs 29.1 From: Christopher Baines Date: Fri, 12 Jan 2024 17:57:26 +0000 In-reply-to: <878r4uk5c7.fsf@gnu.org> Message-ID: <87zfxafmxq.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-Spam-Score: -8.79 X-Migadu-Queue-Id: D07D13F1BB X-Spam-Score: -8.79 X-Migadu-Scanner: mx11.migadu.com X-TUID: thlhp2nasDc7 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > 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/rust.scm (make-rust-sysroot): Move code to >> make-rust-sysroot/implementation. >> (make-rust-sysroot/implementation): New variable. >> >> Change-Id: Ibb30c7398328c87c032bb8828635a34ada935167 > > [...] > >> (define*-public (make-rust-sysroot target) >> - (let ((base-rust rust)) >> + (make-rust-sysroot/implementation target rust)) >> + >> +(define make-rust-sysroot/implementation >> + (mlambda (target base-rust) >> (package >> (inherit base-rust) >> (name (string-append "rust-sysroot-for-" target)) > > We should avoid using =E2=80=98mlambda=E2=80=99 (without =E2=80=98q=E2=80= =99) with packages as it leads > to deep object comparisons. That=E2=80=99s why for packages we typically > always have one-argument (mlambdaq (package) =E2=80=A6). > > But since =E2=80=98base-rust=E2=80=99 wasn=E2=80=99t a parameter before, = let=E2=80=99s keep it simple > (=E2=80=98diff --ignore-space-change=E2=80=99): ... > WDYT? Yeah, that does look good. I pushed my earlier version of this patch this morning though. I did have a look at trying to adapt the changes to fit in (guix build-system cargo) instead, as I noticed that seemed to be a pattern elsewhere, but I think there's something weird going on with the use of make-rust-sysroot there since default-rust-sysroot takes an argument, but doesn't use it. Maybe once that's figured out, we can move the memoization there and switch to just using the target as the key. Unfortunately I'm still waiting to see what effect this has on the data service processing revisions. I'm pretty sure it's going to help, but I'm concerned it's not going to help enough to make processing revisions for patches feasible again. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmWhfyFfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9Xevjw/9GKpOuTwH7hn30C7cFq+lIQqt7Qt5bE9U DFhXIUrzLc+qJNtUZaxuUsPQwks+F2ilKHR7vdBt7W6MKcYjYQTsaWgen46s4q7i Gcb/6pe0HhDDRO/HkZedauqfOFupociG2EsR1v2XgpiWS8zg/8O3g99DN7QjjVg6 hTGN/6MkjI0luREESJ5xu0+n2K0RqtUxkR9yiqRvv+3RFCBgXr0EZAX2B4ytjEWs GA0/LjS78KPO+bKqtZfmoZMwI3fE+2QsjgLhOBWlrGr96pJVRy9DovDJT2OwUbmT wjviXLLQpMTcvzxkTRYDTSU5JbTlmdRxc2AQrDNWz5hT4XBnLGgSnme10rXeMgPO iSN8oxBW6nlFhADhmY+JoRehQmyGaoKy7aL6bVaG87fRoeivPz4iCDZygi0SmwIF qxaPc6IfySAcIuagBI3gXojaLBI7CA+f7iW6VSDZ+k9vPFPixUay5OaeHXh6A5iJ uRLEA7xggcnK+YXTJ0jiKjEuDdEVPKNQdDz2zF9kODzxJm3ocdsOnkFe7q94jEpn zgC99kYZPu+XF73eWIzhsVsvA98BaJlKThSHKTC9odqE6fzG8xfDDJ3JzsCOyb3h Hzcs2PpD++9pKMbG1juwh8yPndKWEWwL68Og9vc/3CxkVAnJtFfkBtnommiSCqx+ rNxZEHNEWPA= =NTdw -----END PGP SIGNATURE----- --=-=-=--