-
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 : stop cloning html render context #100271
Conversation
r? @CraftSpider (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 89c1ed6e040ff3e811ed1715404ece966238c3e7 with merge b4cf7bf90d47893ae5c2eb77817f496726eb8678... |
☀️ Try build successful - checks-actions |
Queued b4cf7bf90d47893ae5c2eb77817f496726eb8678 with parent f03ce30, future comparison URL. |
Finished benchmarking commit (b4cf7bf90d47893ae5c2eb77817f496726eb8678): 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Footnotes |
Do I have to do something ? |
r? @camelid |
☔ The latest upstream changes (presumably #96869) made this pull request unmergeable. Please resolve the merge conflicts. |
Thanks for doing this! I will do my best to look at soon. :) |
☔ The latest upstream changes (presumably #101238) made this pull request unmergeable. Please resolve the merge conflicts. |
I was able to look at this today, and overall it looks very good! I will give it a full review within a few days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for taking so long to review this!
My one concern is that you added several RefCell
s and Cell
s to the new ContextItemFrame
struct and changed &mut Context
to &Context
everywhere. I don't see why this is necessary, and we've been trying really hard to move away from interior mutability. Is it possible to directly mutate ContextItemFrame
through &mut Context
instead?
If that's not possible, please let me know and we'll figure out how to go forward.
@camelid I tried today but The other way is to rewrite places where the borrow checker fail, but this is a lot of time. Thank you for your time ! |
Thanks for your reply! Why do we need |
☔ The latest upstream changes (presumably #102061) made this pull request unmergeable. Please resolve the merge conflicts. |
@Wardenfar FYI: when a PR is ready for review, send a message containing |
@JohnCSimon |
I'll close it for you. @rustbot label: +S-inactive |
The issue was about cleaning the shared context in html rendering.
The problem was that the Context was clone for each item rendered.
I change the rendering process to not clone the context so the shared context do not require anymore to be in a std::rc::Rc
Feel free to give me feedback
This PR may impact performance: should we run perf-test ?
Resolves #82381