Skip to content

[perf] rustdoc: Perform less work when cleaning middle::ty parenthesized generic args#132886

Merged
bors merged 1 commit intorust-lang:masterfrom
fmease:rustdoc-perf-clean-middle-args
Nov 13, 2024
Merged

[perf] rustdoc: Perform less work when cleaning middle::ty parenthesized generic args#132886
bors merged 1 commit intorust-lang:masterfrom
fmease:rustdoc-perf-clean-middle-args

Conversation

@fmease
Copy link
Copy Markdown
Member

@fmease fmease commented Nov 11, 2024

CC #132697. I presume the perf regression it caused (if real) boils down to query invocation overhead, namely of def_kind & trait_def as we don't seem to be decoding more often from the crate metadata.

I won't try the obvious and reduce the amount of query calls by threading information via params as that would render the code awkward.

So instead I'm simply trying to attack some low-hanging fruits in the vicinity.


Previously, we would clean_middle_generic_args unconditionally inside clean_middle_generic_args_with_constraints even though we didn't actually use its result for parenthesized generic args (Trait(...) -> ...).

Now, we only call clean_middle_generic_args when necessary. Lastly, I've simplified clean_middle_generic_args_with_constraints.


r? ghost

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants