From: Maxime Devos <maximedevos@telenet.be>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 49421@debbugs.gnu.org
Subject: [bug#49421] [PATCH] profiles: Optimise 'fonts-dir-file'.
Date: Thu, 15 Jul 2021 20:48:09 +0200 [thread overview]
Message-ID: <369206a276e225478ed1bbce0b883255dccef369.camel@telenet.be> (raw)
In-Reply-To: <5ec75ed429133cbc73dc7916959302033fe70a13.camel@telenet.be>
[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]
> (Also, the manual annotation would go away once 'gs-fonts' is renamed.
> I'll run "echo /gnu/store/*/share/fonts > atchie-fonts" though to see
> if there are other packages not following the convention.)
Scheme code:
(use-modules (ice-9 ftw) (srfi srfi-1))
(define (has-share/fonts? o)
(file-exists? (string-append "/gnu/store/" o "/share/fonts")))
(define t (scandir "/gnu/store" has-share/fonts?))
(define t2 (map (lambda (x) (substring x 33)) t))
(define t3 (delete-duplicates t2))
(define (fonty? x) (string-prefix? "font-" x))
(partition (lambda (x) (string-prefix? "font-" x)) t3)
Output on my system:
$1 = ("font-alias-1.0.3" [...])
$2 = ("fonts-dir" "profile" "mate-1.24.1" "denemo-2.5.0" "mate-1.24.0" "gs-fonts-8.11")
"fonts-dir", "profile" and "gs-fonts" are expected.
"mate" uses "union-build" and has "font-cantarell" in 'inputs'.
Apparently "denemo" has some font files as well.
Something will need to be figured out for these cases,
if the approach of my patch is followed.
I think it's better to optimise 'union-build' and the store deduplication
code though (maybe subdirectories can be process concurrently, to maximise I/O
utilisation?). That should improve performance outside the 'fonts-dir-file' hook
as well.
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
next prev parent reply other threads:[~2021-07-15 18:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-05 19:06 [bug#49421] [PATCH] profiles: Optimise 'fonts-dir-file' Maxime Devos
2021-07-07 16:52 ` Ludovic Courtès
2021-07-15 16:28 ` Maxime Devos
2021-07-15 18:48 ` Maxime Devos [this message]
2021-07-21 14:58 ` Ludovic Courtès
2021-07-16 16:05 ` Ludovic Courtès
2021-07-17 14:42 ` Maxime Devos
2021-07-21 14:48 ` Ludovic Courtès
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=369206a276e225478ed1bbce0b883255dccef369.camel@telenet.be \
--to=maximedevos@telenet.be \
--cc=49421@debbugs.gnu.org \
--cc=ludo@gnu.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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.