guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Optimize package-transitive-supported-systems


From: Ludovic Courtès
Subject: Re: [PATCH] Optimize package-transitive-supported-systems
Date: Mon, 22 Dec 2014 00:37:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Mark H Weaver <address@hidden> 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 <address@hidden>
> 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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]