GNU bug report logs -
#75647
[PATCH 0/2] Optimize profile hooks to avoid unnecessary reruns.
Previous Next
Full log
Message #20 received at 75647 <at> debbugs.gnu.org (full text, mbox):
Hi,
iyzsong <at> envs.net skribis:
> From: 宋文武 <iyzsong <at> member.fsf.org>
>
> * guix/profiles.scm (lower-manifest-entry): Add #:build? keyword argument.
>
> Change-Id: Ifb86d581156034897377f3614fac67b7748e0ec3
[...]
> @@ -319,12 +320,20 @@ (define* (lower-manifest-entry entry system #:key target)
>
> (let ((item (manifest-entry-item entry)))
> (if (string? item)
> - (with-monad %store-monad
> + (mbegin %store-monad
> + (build (list item))
> + (if build?
> + (build (list item))
> + (return #t))
> (return entry))
> - (mlet %store-monad ((drv (lower-object item system
> + (mlet* %store-monad ((drv (lower-object item system
> #:target target))
> +
> (dependencies (recurse entry))
> - (output -> (manifest-entry-output entry)))
> + (output -> (manifest-entry-output entry))
> + (built (if build?
> + (built-derivations (list (cons drv output)))
Overall, I think that building things individually is a bad idea because
it prevents parallelism and makes things overall slower (even if the
“build handler” mechanism mitigates that¹).
You wrote:
> Hello, these patches make each profile hook run upon its specified interested
> inputs, eg: the 'info-dir-file' hook only get inputs with info manuals,
> install a package without info files won't trigger it. Thus reduce the chance
> and time to rerun them when your profile changed.
The ‘info-dir-file’ hooks runs instantly when there are no Info files,
so that’s probably not a good example.
> Years ago tried in <https://issues.guix.gnu.org/29928>, now it seems I don't
> need some hack like 'eval-gexp', just need all manifest entries built before
> hooks.
Yeah, I’m not sure how to move forward.
Perhaps you could identify specific cases of profile hooks that may
often run and use resources for no good reason?
Thanks,
Ludo’.
¹ https://guix.gnu.org/en/blog/2020/grafts-continued/
This bug report was last modified 193 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.