GNU bug report logs - #39258
Faster guix search using an sqlite cache

Previous Next

Package: guix-patches;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Thu, 23 Jan 2020 19:53:02 UTC

Severity: important

Done: Arun Isaac <arunisaac <at> systemreboot.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: mail <at> ambrevar.xyz, 39258 <at> debbugs.gnu.org, zimon.toutoune <at> gmail.com
Subject: [bug#39258] [PATCH v3 1/3] guix: Generate package metadata cache.
Date: Fri, 24 Apr 2020 22:48:36 +0200
Hi Arun,

Arun Isaac <arunisaac <at> systemreboot.net> skribis:

> * gnu/packages.scm (%package-metadata-cache-file): New variable.
> (generate-package-metadata-cache): New function.
> * guix/channels.scm (package-metadata-cache-file): New function.
> (%channel-profile-hooks): Add package-metadata-cache-file.

This is short and sweet, nice!

> +  (define (expand-cache package result)
> +    (cons `#(,(package-name package)
> +             ,(package-version package)
> +             ,(delete-duplicates
> +               (map package-full-name
> +                    (sort (filter package? (package-direct-inputs package))
> +                          package<?)))
> +             ,(package-outputs package)
> +             ,(package-supported-systems package)
> +             ,(package-synopsis package)
> +             ,(package-description package)
> +             ,(package-home-page package)
> +             ,(let ((location (package-location package)))
> +                (list (location-file location)
> +                      (location-line location)
> +                      (location-column location))))

I was wondering if we could omit inputs, which are not that useful.

Apart from that it LGTM.

Note that this is probably the place where we could eventually add the
computation of an inverted index like zimoun suggested in
<https://lists.gnu.org/archive/html/guix-devel/2020-01/msg00243.html>.

> +                                  #:properties '((type . profile-hook)
> +                                                 (hook . package-cache))

‘package-metadata-cache’, even (it’s for UI purposes).

Nitpick: I’d use “packages:” as the prefix in the subject line.

Thanks,
Ludo’.




This bug report was last modified 37 days ago.

Previous Next


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