Subject: Re: bug#44254: Performance of package input rewriting

From: Lars-Dominik Braun <[email-masked]>
Date: Fri, 30 Oct 2020 09:42:45 +0100

Hi,

> Yes, that’s a possible culprit.  Try passing #:deep? #f if it works for
> your use case.
Yeah, that brings it down to ~8s, which is still alot.

> Another thing to look at is the <package> object graph (as show by ‘guix
> graph’).  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.
Aha, it’s 913 nodes without rewriting, 13916 with rewriting (#:deep? #t) and
4286 with rewriting (#:deep? #f) as determined by a rather ad-hoc `guix graph
-L . -t package python-jupyterlab | grep 'shape = box' | wc -l`. That seems way
too much. Does that mean I’m using package rewriting in the wrong way or is
that a bug?

Unfortunately I don’t have a short reproducer right now. I’ll look at the graph
more closely to figure out which parts are actually duplicated. Maybe I can
create a reproducing testcase with more information.

Cheers,
Lars