Speed up remote Cargo.toml deserialization - #17296
Conversation
|
Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @epage (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 (
Why was this reviewer chosen?The reviewer was selected based on:
|
There was a problem hiding this comment.
Side note: You seems to open a bunch of PRs addressing performance issues recently. It would be good to chime in with us on Zulip or open an issue dicussing what you're looking at and what your methodology is, so that we can be more aligned on the project development direction and expectations. We also have issues with Performance label that capture more algorithmic and architectural possibility to improve Cargo's performance.
|
Thanks for the review — addressed in the force-pushed update:
Also noted on methodology / not opening a burst of mixed perf PRs — happy to sync on Zulip as you suggested. |
|
@rustbot review |
|
Converting this PR back to draft. After re-review, this is not merge-ready:
Next before leaving draft:
Sorry for the premature “ready” framing. |
|
Taking back out of draft for review after rustfmt fix. Scope remains: faster non-local manifest deserialize ( |
|
@rustbot review |
Back to draft until review concerns are actually closedThanks again @weihanglo @epage. Taking this out of ready so we don’t ask for merge review while these are open:
I will only mark ready again when (2)+(3) are in the branch. No more ready/draft thrash. |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
What does this resolve?
Cargo retained an owned spanned TOML document for every manifest, including cached remote registry and git packages. Those remote packages do not need a retained document after deserialization.
The source policy is explicit and exhaustive:
The direct path still uses
serde_ignoredandemit_toml_diagnostic, preserving unused-key tracking plus diagnostic messages and spans. Only document cloning and ownership are skipped.Review feedback
SourceKindmatch replaces the broad!is_path()classification.read_manifest; there is no helper module.Validation
cargo +1.97.0 fmt --all -- --checkcargo +1.97.0 test -p cargo --test testsuite registry::remote_registry_manifest_without_document