From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 10:20:06 2020 Received: (at 44254) by debbugs.gnu.org; 28 Oct 2020 14:20:06 +0000 Received: from localhost ([127.0.0.1]:50002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXmJ3-0000vH-Oz for submit@debbugs.gnu.org; Wed, 28 Oct 2020 10:20:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXmJ2-0000uh-6s for 44254@debbugs.gnu.org; Wed, 28 Oct 2020 10:20:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45039) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXmIw-0006no-Pc; Wed, 28 Oct 2020 10:19:58 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41206 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kXmIw-0007iu-AN; Wed, 28 Oct 2020 10:19:58 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: bug#44254: Performance of package input rewriting References: <20201027132614.GB3081@zpidnp36> <86361z4uyp.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 7 Brumaire an 229 de la =?utf-8?Q?R=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: Wed, 28 Oct 2020 15:19:56 +0100 In-Reply-To: <86361z4uyp.fsf@gmail.com> (zimoun's message of "Tue, 27 Oct 2020 15:14:22 +0100") Message-ID: <87o8km301f.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: 44254 Cc: 44254@debbugs.gnu.org, Lars-Dominik Braun 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 (---) Hi, zimoun skribis: > On Tue, 27 Oct 2020 at 14:26, Lars-Dominik Braun wrote: > >> Previously I have been doing this using package-input-rewriting, but sta= rting >> an environment containing python-jupyterlab alone took about 20s (warm c= aches, >> all derivations in the store). Manually rewriting inputs by inheriting a= nd >> alist-delete=E2=80=99ing brings this down to 3s, which is pretty signifi= cant. >> --no-grafts has not much of an impact (15s vs 2s) here. See >> https://github.com/guix-science/guix-science/commit/972795a23cc9eb5a0bb1= a2ffb5681d151fc4d4b0 >> for the exact changes. > > Is it not related to =E2=80=9C#:deep? #t=E2=80=9C by default? The defaul= t was #f. Yes, that=E2=80=99s a possible culprit. Try passing #:deep? #f if it works= for your use case. Another thing to look at is the object graph (as show by =E2=80= =98guix graph=E2=80=99). Input rewriting can duplicate parts of the graph, which in turn defeats package->derivation memoization. Just looking at the number of nodes in the graph can give hints. Like Ricardo wrote, it=E2=80=99d be great it you could share a short reprod= ucer. Thanks, Ludo=E2=80=99.