Repository navigation
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 |
Snapshot what `cargo check` reports when a dependency's `Cargo.toml` has unused keys, fails to deserialize, or fails to parse, for remote registry, git, local-registry, and directory sources.
|
Unsure how this got marked as closed. I've gone ahead and re-implemented it in #17701. |
…make This is a follow up to rust-lang#17697 that clarifies the bench names and adds additional benches in prep for experimenting with other optimizations like - Avoiding `make_owned` like in rust-lang#17296 - Caching in alternative formats
This takes manifest parse time from 113us to 105us. Any diagnostic that needs the TOML format is affected which is lints but those are all scoped to local anyways. This supersedes rust-lang#17296. Unsure how it got closed. Compared to that - We trigger purely off of local (path) vs not which is the same decision made for most lints - No tests were added since they weren't adding much value - The code is simpler while doing the same thing
…rust-lang#17701) ### What does this PR try to resolve? This takes manifest parse time from 113us (`de_table_parse_make_owned_deserialize_tokio`) to 105us (`de_table_parse_deserialize_tokio` which is the same as `toml_from_str_tokio`). Any diagnostic that needs the TOML format is affected which is lints but those are all scoped to local anyways. ### Notes to reviewers This supersedes rust-lang#17296. Unsure how it got closed. Compared to that - We trigger purely off of local (path) vs not which is the same decision made for most lints - No tests were added since they weren't adding much value - The code is simpler while doing the same thing Bench changes is a follow up to rust-lang#17697 which was only focused on `toml_from_str_tokio` which wasn't a full representation of what we're doing there. This is also to leave room for other benches like exploring cached parses of manifests in formats that are faster to parse than TOML. --- 🤖 LLM involvement: experimentation
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