From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] Optimize package-transitive-supported-systems
Date: Mon, 22 Dec 2014 00:37:54 +0100 [thread overview]
Message-ID: <871tnspoa5.fsf@gnu.org> (raw)
In-Reply-To: <873888n0g4.fsf@netris.org> (Mark H. Weaver's message of "Sun, 21 Dec 2014 16:43:23 -0500")
Mark H Weaver <mhw@netris.org> skribis:
> When hydra evaluates a jobset, 'package-transitive-supported-systems' is
> called for every package+system combination. Each of these calls
> traverses the tree of inputs, but without eliminating duplicate
> transitive-inputs. In other words, the amount of time spent is
> proportional not to the number of transitive-inputs, but the number of
> _paths_ to all transitive-inputs.
Oops! Though it’s not clear to me that it explains the problems we’re
seeing on Hydra currently, because running
build-aux/hydra/gnu-system.scm on my laptop takes ~1mn.
> This patch memoizes 'package-transitive-supported-systems', so that the
> total time to apply it to all packages is O(N).
Much better.
> From 90541f6c7e2a9e2f8a7b412532b4b5a56a10e481 Mon Sep 17 00:00:00 2001
> From: Mark H Weaver <mhw@netris.org>
> Date: Sun, 21 Dec 2014 16:21:02 -0500
> Subject: [PATCH] Optimize package-transitive-supported-systems.
>
> * guix/packages.scm (first-value): Remove.
> (define-memoized/v): New macro.
> (package-transitive-supported-systems): Rewrite.
LGTM, thank you!
Ludo’.
prev parent reply other threads:[~2014-12-21 23:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-21 21:43 [PATCH] Optimize package-transitive-supported-systems Mark H Weaver
2014-12-21 23:37 ` Ludovic Courtès [this message]
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871tnspoa5.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=mhw@netris.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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).