Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay the creation of the context used when a package failed to build up until the package failed #6278

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kit-ty-kate
Copy link
Member

Noticed while reviewing #6274.
It turns out that we try to fetch the revision of each packages being built even before executing the command, but that information is only used in rare cases so if many git packages are used this can cause some wasted time (not too much, up to a couple seconds on slow hardware with large installs, but not nothing)

Copy link
Collaborator

@rjbou rjbou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR contains 2 things: the delay of context creation for package build, and the delay of metadata processes as the sumary is not always printed. PR title is good, but main comment and master changes should contains both. Ideally, 2 commits if it can be easily split.
Otherwise, lgtm!

@@ -606,7 +612,7 @@ let set_verbose_f, print_verbose_f, isset_verbose_f, stop_verbose_f =
(* implem relies on sigalrm, not implemented on win32.
This will fall back to buffered output. *)
if Sys.win32 then () else
let files = OpamStd.List.sort_nodup compare files in
let files = OpamStd.List.sort_nodup OpamStd.Compare.compare files in
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let files = OpamStd.List.sort_nodup OpamStd.Compare.compare files in
let files = OpamStd.List.sort_nodup String.compare files in

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants