(address . bug-guix@gnu.org)
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').
Toggle snippet (6 lines)
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.
Interestingly, profiling does not give us anything useful:
Toggle snippet (4 lines)
scheme@(guix-user)> ,pr (and (home-mpv-configuration (global (mpv-profile-configuration (fullscreen #t)))) #t)
No samples recorded.
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
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
-----BEGIN PGP SIGNATURE-----
iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmdXCQwOHH5Ad29sZnNk
ZW4uY3oACgkQL7/ufbZ/wamT4hAAg8D+H05v8RtRA4NjEP/K429gwVFI+rwBZ8Qh
kHr9JRHcUyeW6KoWXaE+ugRIqFALTv9wDj8LlZeA6XMKVar55ZvJN42JNKr9Vxi9
Su3aXSwZ8ou8NwiVs/2bkS9PpEM2yEA1vclQ5R1w4MybuJ3OCXkDNZ/st++CzKiJ
ydZLy4bkxwvpX4KG0L1m0V9cA0rEn8lo09TpGLdwyptJd4OJMZ691MoFEnwZUVlx
3O7JyO3mh7ZeaGZvH3y8g1qG65/f3HAtk9Af3nr1ukHJ1NEu4czb9vSE8DL9mTKx
Je9mOUqKn6e6r8oYfpgk1KcANpiv+s4nXSx4vtmcWstVKpkss0vH/FuYepvN2eUp
70EyMSDA3MoZ6Af9+sS3XFx8J8nNfacqkvqWS1QV1jykEk++s4xRjsZkb+ki56sj
jj4O3wF1PwzZZg4tKgJvOtCnwGZt59XOK8ZpM5KdwNhdIeMsVu6/9wVB+bWoXdC3
HX2XoDw1KugQXgFr6xKfoyvktOkxYfCN7TTGiWhYxOGK2GBUlnVki4J5VYfsokqx
u18wjBYxQQZkKz196UBPRAW/SM0tjXbj6xGr0yePPQVpChxANvZRqiEoxjEYZ4sH
TMbAlfEwUTfgS20yv5p9Bssw4d4p7CY9FUS4pLiiXOMlJ9APGM2DiKE8jnFsTvQh
oTgtbD4=
=4w6D
-----END PGP SIGNATURE-----