GNU bug report logs - #50755
[PATCH] import: Generate list of importers based on available modules

Previous Next

Package: guix-patches;

Reported by: pinoaffe <pinoaffe <at> airmail.cc>

Date: Thu, 23 Sep 2021 12:25:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: zimoun <zimon.toutoune <at> gmail.com>
To: pinoaffe <pinoaffe <at> airmail.cc>
Cc: 50755 <at> debbugs.gnu.org
Subject: [bug#50755] [PATCH v3] import: Generate list of importers based on available modules
Date: Mon, 27 Sep 2021 22:09:26 +0200
Hi,

On Mon, 27 Sept 2021 at 20:21, pinoaffe <pinoaffe <at> airmail.cc> wrote:

> +(define importers (delete-duplicates

This fixes my first point...

> +                   (filter-map (lambda (module)
> +                                 (match (module-name module)
> +                                   (`(guix scripts import ,importer)
> +                                    (symbol->string importer))
> +                                   ( #t #f)))
> +                               (all-modules (map (lambda (entry)
> +                                                   `(,entry . "guix/scripts/import"))
> +                                                 %load-path)))))

...and it means it is walking more than needed.  Therefore, what is
the performance loss?

For instance, on my machine and hot cache, it is 4x slower.  And, this
readibility improvement is not worth, IMHO.
On cold cache, I do not have meaningful numbers because it requires to
run it several times and then compute an average.  What are the
numbers of your machine?

All the best,
simon




This bug report was last modified 3 years and 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.