rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
99.01k stars 12.79k forks source link

Use ReadCache for archive reading in bootstrap #133462

Closed mustartt closed 3 days ago

mustartt commented 4 days ago

Address expensive archive reading in bootstrap. This fixes https://github.com/rust-lang/rust/issues/133268

Enable the std feature of object to use ReadCache instead of reading the entire archive file into memory to check for headers. This takes minimal extra time to compile compared to introducing other expensive dependencies to bootstrap.

r? jieyouxu

rustbot commented 4 days ago

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jieyouxu (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

jieyouxu commented 4 days ago

Thanks! @bors r+ rollup

bors commented 4 days ago

:pushpin: Commit 9f1cfec299a1060bdd8382d3e6a6ebd8dc64d3ab has been approved by jieyouxu

It is now in the queue for this repository.

mustartt commented 3 days ago

Probably a good idea to have this patch to speed up the boostrap for 1.84 builds. This also fixes a small build error on AIX.

@rustbot label beta-nominated

apiraino commented 1 day ago

Beta backport declined as per compiler team on Zulip, as far as we can see this is mostly about perf. improvements.

@rustbot label -beta-nominated

davidtwco commented 1 day ago

Similarly to https://github.com/rust-lang/rust/pull/133217#issuecomment-2506384980:

Thanks for taking the time to fix this bug. Just to add to what @apiraino has said, the project's backport policy describes how we typically only backport regressions, and as far as we can tell, this isn't a regression, it's always been an issue. We also weigh up the risk vs reward for a backport, how likely a change is to break something vs how critical the issue is (can it be worked around, is it on a tier one platform, etc).