GNU bug report logs -
#74748
Constructor created by define-configuration is slow (>25s) when many fields are defined
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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 (text/x-guile, attachment)]
[Message part 3 (text/plain, inline)]
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 62 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.