all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: Josselin Poiret <dev@jpoiret.xyz>, guix-devel@gnu.org
Subject: Re: Guix pull speed
Date: Tue, 05 Sep 2023 19:36:29 +0200	[thread overview]
Message-ID: <86wmx4r082.fsf@gmail.com> (raw)
In-Reply-To: <87wmxe3vsa.fsf@jpoiret.xyz>

Hi Josselin,

On Tue, 29 Aug 2023 at 13:58, Josselin Poiret <dev@jpoiret.xyz> wrote:

> After looking a bit more into guix pull speed, or to be more precise the
> "Computing Guix derivation..." step, which is not substitutable.  I've
> come to the conclusion that the thing that takes the majority of the
> time is loading the files that define the packages that the new Guix
> needs to build itself.

Well, on my machine, the bigger bottleneck seems the procedure name
’proxy’ which copies stuff around, IIUC. See [1].


>                         These files are not compiled yet, and worse,
> loading just (gnu packages guile) ends up loading 361 other package
> files.  You can generate a package graph in GraphML with `guix graph -t
> module -b graphml guile`, and use e.g. networkx to analyze it.

Hum, is this ’graphml’ something you have not submitted?  Or am I
missing a point?  Last time I played with “guix graph”, I wrote a small
script for bridging with networkx.  See [2].


> You can compare with a compiled check-out of guix by just running the
> following in a `guix repl`:
> --8<---------------cut here---------------start------------->8---
> (use-modules (guix self) (guix monad-repl))
> ,run-in-store (guix-derivation (getcwd) "0.0-git" #:pull-version 1)
> --8<---------------cut here---------------end--------------->8---
> which takes at most 5 seconds on my laptop.

Yeah, that’s fast. :-)

For comparing, what would be the corresponding derivations that “guix
pull” is building?


> One idea I had was to move all the packages that are looked up in (guix
> self) to their own little bubble, to avoid having to load extra stuff.
> However, this is not currently possible because some of them do have
> non-trivial dependency graphs.  I've identified these problematic
> inputs: guile-avahi guile-ssh guile-git guile-gnutls guix-daemon (it
> pulls in all other dependencies itself) po4a graphviz
>
> What could be done about this?  Another solution would be to somehow
> build Guix without any of the dependencies and then add them in later,
> similar to what is done with build-aux/build-self.scm to be able to load
> (guix self) in the first place.  That seems quite complex though.

Thanks for looking at this.  Well, as reported in [1], I am missing what
is the aim of the procedure ’proxy’ and if it could be avoided.

Cheers,
simon


1: Slow guix pull
Simon Tournier <zimon.toutoune@gmail.com>
Wed, 23 Aug 2023 15:48:06 +0200
id:86o7ix3m5l.fsf@gmail.com
https://lists.gnu.org/archive/html/guix-devel/2023-08
https://yhetil.org/guix/86o7ix3m5l.fsf@gmail.com

2: Some stats about the graph of dependencies
zimoun <zimon.toutoune@gmail.com>
Fri, 09 Dec 2022 18:29:43 +0100
id:874ju4qyd4.fsf@gmail.com
https://lists.gnu.org/archive/html/guix-devel/2022-12
https://yhetil.org/guix/874ju4qyd4.fsf@gmail.com


  reply	other threads:[~2023-09-05 19:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29 11:58 Guix pull speed Josselin Poiret
2023-09-05 17:36 ` Simon Tournier [this message]
2023-09-06  9:45   ` Josselin Poiret
2023-09-06 19:45     ` Simon Tournier
2023-09-07  8:36       ` Josselin Poiret
2023-09-07  9:37         ` Simon Tournier
2023-09-14  9:58 ` Ludovic Courtès
2023-09-19 11:55   ` Simon Tournier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86wmx4r082.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=dev@jpoiret.xyz \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.