-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[rustdoc] Box ItemKind::Impl
to shrink the size of Item
#79967
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
@GuillaumeGomez I plan to box a couple other variants too - would you prefer I do that here or in a separate PR? The only reason I'd separate it is to get more accurate perf numbers, but if we get a perf run on this I think we could compare later runs to the first one? |
I'd prefer in other PRs yes. Like that we can compare more accurately and it makes reviewing easier for me. :) |
Another alternative I didn't think of earlier is to box the whole |
7896b78
to
32b2b42
Compare
@GuillaumeGomez I made all the changes I planned to make so that I can compare them to the alternative approach in #80014. If we end up making this change I can split them into separate PRs, but I don't think it make sense to make any of these changes if 80014 gets merged, so I want to compare the final impact. @bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 32b2b42 with merge 7fee63e6e685445eb5cb2757a4441b41db343277... |
☀️ Try build successful - checks-actions |
Queued 7fee63e6e685445eb5cb2757a4441b41db343277 with parent 057937b, future comparison URL. |
Finished benchmarking try commit (7fee63e6e685445eb5cb2757a4441b41db343277): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
Max of -2.1% on instructions, max of -1.3% on max-rss. I think I would prefer to go with #80014 because it improves max-rss more. |
[rustdoc] Box ItemKind to reduce the size of `Item` This brings the size of `Item` from ``` [src/librustdoc/lib.rs:103] std::mem::size_of::<Item>() = 536 ``` to ``` [src/librustdoc/lib.rs:103] std::mem::size_of::<Item>() = 136 ``` This is an alternative to rust-lang#79967; I don't think it makes sense to make both changes. Helps with rust-lang#79103.
Helps with #79103. Builds on #79957 and should not be merged before. Eventually I want to calculate this info on demand (#76382) but that turned out to be quite difficult so I'm leaving it for later and slapping on this short-term fix.
This brings the size of Item and ItemKind from
to
Waiting to start a perf run until #79957 lands.