Skip to content
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: Reduce allocations in a markdown function #95905

Merged
merged 1 commit into from Apr 13, 2022
Merged

rustdoc: Reduce allocations in a markdown function #95905

merged 1 commit into from Apr 13, 2022

Conversation

vacuus
Copy link
Contributor

@vacuus vacuus commented Apr 10, 2022

Not html::markdown this time, just markdown, haha.

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Apr 10, 2022
@rust-highfive
Copy link
Collaborator

r? @GuillaumeGomez

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 10, 2022
@vacuus
Copy link
Contributor Author

vacuus commented Apr 10, 2022

Uh, I did not mean to update the miri submodule. Lemme try to fix that.

@vacuus
Copy link
Contributor Author

vacuus commented Apr 10, 2022

write!ing to a String is infallible, right?

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();
Copy link
Member

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.

@GuillaumeGomez
Copy link
Member

In the meantime, let's run a perf check.

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 12, 2022
@bors
Copy link
Contributor

bors commented Apr 12, 2022

⌛ Trying commit a3c822a6cbffdfb06b0805b9469d5e62e04036b4 with merge 4fc7dbca2d468e5530840a7d3a62216ad92413ad...

@bors
Copy link
Contributor

bors commented Apr 12, 2022

☀️ Try build successful - checks-actions
Build commit: 4fc7dbca2d468e5530840a7d3a62216ad92413ad (4fc7dbca2d468e5530840a7d3a62216ad92413ad)

@rust-timer
Copy link
Collaborator

Queued 4fc7dbca2d468e5530840a7d3a62216ad92413ad with parent 4e1927d, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4fc7dbca2d468e5530840a7d3a62216ad92413ad): comparison url.

Summary:

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 🎉 relevant improvements found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 1 0 11 0
mean2 N/A 0.4% N/A -0.3% N/A
max N/A 0.4% N/A -0.4% N/A

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
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

Footnotes

  1. number of relevant changes

  2. the arithmetic mean of the percent change

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 12, 2022
@GuillaumeGomez
Copy link
Member

Seems like a nice perf improvement. Waiting for the expect then I'll approve it.

@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+ rollup=never

@bors
Copy link
Contributor

bors commented Apr 12, 2022

📌 Commit ab3ab4d has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 12, 2022
@bors
Copy link
Contributor

bors commented Apr 12, 2022

⌛ Testing commit ab3ab4d with merge f6cef57...

@bors
Copy link
Contributor

bors commented Apr 13, 2022

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing f6cef57 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 13, 2022
@bors bors merged commit f6cef57 into rust-lang:master Apr 13, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 13, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f6cef57): comparison url.

Summary:

  • Primary benchmarks: 🎉 relevant improvements found
  • Secondary benchmarks: mixed results
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 2 4 4 4
mean2 N/A 1.2% -0.3% -0.3% -0.3%
max N/A 1.2% -0.4% -0.4% -0.4%

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. number of relevant changes

  2. the arithmetic mean of the percent change

@pnkfelix
Copy link
Member

Visiting for weekly performance triage

  • the primary regressions were to externs incr-full, debug and opt variants.
  • from looking at the graph, there may be a faint upward trend on externs as a whole, but pnkfelix does not think this PR caused any direct regression.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Apr 20, 2022
@vacuus vacuus deleted the markdown-render branch April 21, 2022 21:22
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-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.

None yet

7 participants