[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#74748: Constructor created by define-configuration is slow (>25s) wh
From: |
Tomas Volf |
Subject: |
bug#74748: Constructor created by define-configuration is slow (>25s) when many fields are defined |
Date: |
Mon, 09 Dec 2024 16:13:16 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hello,
I am writing a configuration for mpv and hit an issue of the generated
constructor (`home-mpv-configuration') is extremely slow. While the
almost 800 fields is unusually high, initializing the instances of the
record should *not* take almost 30 seconds. The full file is attached
to this email (as `mpv.scm').
--8<---------------cut here---------------start------------->8---
scheme@(guix-user)> ,use (gnu home services mpv)
scheme@(guix-user)> ,t (and (home-mpv-configuration (global
(mpv-profile-configuration (fullscreen #t)))) #t)
$1 = #t
;; 29.615315s real time, 50.896973s run time. 24.031723s spent in GC.
--8<---------------cut here---------------end--------------->8---
Interestingly, profiling does not give us anything useful:
--8<---------------cut here---------------start------------->8---
scheme@(guix-user)> ,pr (and (home-mpv-configuration (global
(mpv-profile-configuration (fullscreen #t)))) #t)
No samples recorded.
--8<---------------cut here---------------end--------------->8---
I also tried to remove all my custom sanitizers, to make sure the issue
is not in my code, but that did not help.
I took a short look, but code of both the define-configuration and of
Guix records is complex, full of syntax magic and I did not have any
luck trying to debug it myself. Hence this report.
Have a nice day,
Tomas
mpv.scm
Description: Reproducer.
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
signature.asc
Description: PGP signature
- bug#74748: Constructor created by define-configuration is slow (>25s) when many fields are defined,
Tomas Volf <=