-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc: Reduce allocations in a markdown
function
#95905
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
(rust-highfive has picked a reviewer for you, use r? to override) |
Uh, I did not mean to update the miri submodule. Lemme try to fix that. |
|
src/librustdoc/markdown.rs
Outdated
let s = format!("<link rel=\"stylesheet\" type=\"text/css\" href=\"{name}\">\n"); | ||
css.push_str(&s) | ||
// `write!`ing to a `String` is infallible | ||
write!(css, r#"<link rel="stylesheet" type="text/css" href="{name}">"#).unwrap(); |
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.
Then please use .expect
instead. It's better for error messages.
In the meantime, let's run a perf check. @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit a3c822a6cbffdfb06b0805b9469d5e62e04036b4 with merge 4fc7dbca2d468e5530840a7d3a62216ad92413ad... |
☀️ Try build successful - checks-actions |
Queued 4fc7dbca2d468e5530840a7d3a62216ad92413ad with parent 4e1927d, future comparison URL. |
Finished benchmarking commit (4fc7dbca2d468e5530840a7d3a62216ad92413ad): comparison url. Summary:
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 |
Seems like a nice perf improvement. Waiting for the |
Thanks! @bors: r+ rollup=never |
📌 Commit ab3ab4d has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (f6cef57): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Visiting for weekly performance triage
@rustbot label: +perf-regression-triaged |
Not
html::markdown
this time, justmarkdown
, haha.