-
Notifications
You must be signed in to change notification settings - Fork 973
Concurrently download components of a toolchain #4436
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
Concurrently download components of a toolchain #4436
Conversation
10d1514
to
7093333
Compare
837bf58
to
4737f25
Compare
After my investigation stemming from this comment, I have concluded that the changes presented on this PR are not consistent with the previous behavior of displaying a progress bar during the installation of the component. Would this be necessary, especially considering that the next step will be to interleave the downloads with the installation? |
@FranciscoTGouveia No, I don't think it is necessary for that part of the behavior to stay unchanged, as you have already mentioned. Of course, if it is easy to add it back, then it might still be interesting to do so. |
d071c86
to
f4e41d5
Compare
Thank you for all the reviews comments. Additionally, I would like to highlight one point:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking much better to me! Many thanks @FranciscoTGouveia for the work and @djc for a second round of review :)
I've left just a final nit but otherwise I believe this PR is quite ready to be merged 🎉
f4e41d5
to
1fa0edc
Compare
(Also, CI failures...) |
Some notifications needed to be updated to include the download URL, enabling the identification of the component being downloaded. This was necessary for accurate progress reporting of each component.
1fa0edc
to
78bd82c
Compare
I believe it was a spurious failure. |
As of now, each component of a toolchain is downloaded sequentially, leaving room for performance improvements.
This is particularly notorious when considering interleaving downloads with installation, as discussed in #731.
Following the work made in #4426, as the
DownloadTracker
is nowindicatif
-based, doing the progress reporting for concurrent downloads is much easier.As such, this PR comes to enable downloading different components concurrently (possibly closing #3018).
Performance-wise, benchmarks using
hyperfine
showed a small (1.1x) speedup -- which doesn't seem noticeable but lays the foundations for a future PR to interleave the download with the installation (of components).The benchmarks were ran 50 times (with 5 warmup runs) over a 50 Mbps connection, each downloading an entire toolchain.
Many thanks to @rami3l and his PR for refactoring part of the test suite for the purpose of this PR.