From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +F+OFKF+mV+WfAAA0tVLHw (envelope-from ) for ; Wed, 28 Oct 2020 14:22:25 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id YFudEKF+mV9KYQAAbx9fmQ (envelope-from ) for ; Wed, 28 Oct 2020 14:22:25 +0000 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 BCB119403D5 for ; Wed, 28 Oct 2020 14:22:24 +0000 (UTC) Received: from localhost ([::1]:39398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXmLG-0005EM-SL for larch@yhetil.org; Wed, 28 Oct 2020 10:22:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXmJz-0004H5-17 for bug-guix@gnu.org; Wed, 28 Oct 2020 10:21:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38456) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXmJy-00073O-Km for bug-guix@gnu.org; Wed, 28 Oct 2020 10:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kXmJy-0000wz-Hu for bug-guix@gnu.org; Wed, 28 Oct 2020 10:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44254: Performance of package input rewriting Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 28 Oct 2020 14:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44254 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: zimoun Received: via spool by 44254-submit@debbugs.gnu.org id=B44254.16038948063557 (code B ref 44254); Wed, 28 Oct 2020 14:21:02 +0000 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 44254@debbugs.gnu.org, Lars-Dominik Braun Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -1.51 X-TUID: nmnZDP6J/07y 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.