-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc: strategic boxing to reduce the size of ItemKind and Type #100645
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
Conversation
This reduces the size of Type.
This reduces the memory consumption of ItemKind.
(rust-highfive has picked a reviewer for you, use r? to override) |
As soon as this is done building, I'll run a perf experiment to see if this is actually a win. |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 238bcc9 with merge eb4510756c119d10c4fee50388ef4569b090e88a... |
☀️ Try build successful - checks-actions |
Queued eb4510756c119d10c4fee50388ef4569b090e88a with parent 5746c75, future comparison URL. |
Finished benchmarking commit (eb4510756c119d10c4fee50388ef4569b090e88a): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Footnotes |
Some changes occurred in src/librustdoc/clean/types.rs cc @camelid |
Looks like a real memory usage improvement on |
Other than my question, looks really good! |
Thanks! @bors r+ r=never |
💡 This pull request was already approved, no need to approve it again.
|
The commit says @bors r- |
@bors r=GuillaumeGomez rollup=never |
☀️ Test successful - checks-actions |
Finished benchmarking commit (650bff8): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
The
Type
change redesignsQPath
to box the entire data structure instead of boxingself_type
and thetrait_
.This reduces the size of several
ItemKind
variants, leavingImpl
as the biggest variant. TheItemKind
change boxes that variant's payload.