ZipReadBinaryProvider: Decompress largest zip archives first#1715
Merged
BillyONeal merged 1 commit intomicrosoft:mainfrom Jun 30, 2025
Merged
Conversation
This results in lower total time needed to decompress all zip files.
Member
|
... what? Do we know why that order is faster? |
Contributor
Author
|
If you have 2 cores and the Tasks You are using 7 time slots. If you start with the largest: you only need 5 time slots. |
Member
|
I see, because we are parallelizing it's the bin packing problem and we're using size as a proxy for how big each task is in the bin. |
BillyONeal
approved these changes
Jun 30, 2025
Member
BillyONeal
left a comment
There was a problem hiding this comment.
Thanks for the improvement!
BillyONeal
reviewed
Oct 8, 2025
| m_fs.file_size(zip_paths[i].get()->path, VCPKG_LINE_INFO)); | ||
| action_idxs.push_back(i); | ||
| } | ||
| std::sort(jobs_with_size.begin(), jobs_with_size.end(), [](const auto& l, const auto& r) { |
Member
There was a problem hiding this comment.
I just realized this is completely broken because it broke the invariant that action_idxs[N] is talking about jobs[N] for all N, so we are now recording which packages got restored completely incorrectly :(
Contributor
Author
There was a problem hiding this comment.
Hm then we have to also Save the original Index for every job
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This results in lower total time needed to decompress all zip files.
For example from 4.4 min to 3.8 min @ daily job