From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#22990: Grafts leads to inefficient substitute info retrieval Date: Sun, 29 Mar 2020 15:41:24 +0200 Message-ID: <87tv271dob.fsf@gnu.org> References: <8737rxx8gk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:55736) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIkII-0004g3-P8 for bug-guix@gnu.org; Sun, 29 Mar 2020 22:36:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jIkIF-0004TR-H6 for bug-guix@gnu.org; Sun, 29 Mar 2020 22:36:54 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48712) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jIkIF-0004T9-D3 for bug-guix@gnu.org; Sun, 29 Mar 2020 22:36:51 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jIkIF-0004pp-B2 for bug-guix@gnu.org; Sun, 29 Mar 2020 22:36:51 -0400 Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <8737rxx8gk.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 11 Mar 2016 17:52:59 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: 22990-done@debbugs.gnu.org Hi younger self! ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > As of right now (v0.9.0-2007-g66a30a3), =E2=80=98graft-derivation=E2=80= =99 works either by: > > 1. Fetching substitute info about the things being built so that it > can determine its references, which in turns allows it to determine > whether they need to be grafted. > > 2. Building stuff, as a last resort, so that it can determine its > references. > > Case #1 is hopefully going to be the most common. > > The problem with #1 is that when building a profile, we do one > =E2=80=98package-derivation=E2=80=99 call for each package in the profile= , which > translates in one =E2=80=98graft-derivation=E2=80=99 call for each releva= nt package=C2=B9, > which translates into one =E2=80=98references/substitutes=E2=80=99 call f= or each. > > Concretely, what this means is this: > > $ guix package -u > substitute: updating list of substitutes from 'http://mirror.guixsd.org= '... 100.0% > substitute: updating list of substitutes from 'http://mirror.guixsd.org= '... 100.0% > substitute: updating list of substitutes from 'http://mirror.guixsd.org= '... 100.0% > substitute: updating list of substitutes from 'http://mirror.guixsd.org= '... 100.0% > substitute: updating list of substitutes from 'http://mirror.guixsd.org= '... 100.0% > substitute: updating list of substitutes from 'http://mirror.guixsd.org= '... 100.0% > substitute: updating list of substitutes from 'http://mirror.guixsd.org= '... 100.0% > [=E2=80=A6] > The following files would be downloaded: > > Each of the initial =E2=80=9Cupdating list=E2=80=9D message corresponds t= o an HTTP > request for a single narinfo file, which can take around 1 second. This is finally fixed with commit 710854304b1ab29332edcb76f3de532e0724c197, as discussed earlier this week=C2=B9. \o/ The solution is simpler and more orthogonal than what was envisioned earlier in this thread, which is nice. I also potentially addresses other uses of =E2=80=9Cdynamic dependencies=E2= =80=9D elsewhere in the code base, such as =E2=80=98remote-eval=E2=80=99 calls in = =E2=80=98guix deploy=E2=80=99. Feedback welcome! Ludo=E2=80=99. =C2=B9 https://lists.gnu.org/archive/html/guix-devel/2020-03/msg00337.html