Uh oh!
There was an error while loading. Please reload this page.
rustdoc: Optimize and refactor doc link resolution - #96135
Conversation
rust-highfive
commented
Apr 17, 2022
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
Some changes occurred in cc @camelid |
rust-highfive
commented
Apr 17, 2022
(rust-highfive has picked a reviewer for you, use r? to override) |
petrochenkov
commented
Apr 17, 2022
@bors try @rust-timer queue |
rust-timer
commented
Apr 17, 2022
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Apr 17, 2022
⌛ Trying commit afd1ce9da528a376d8bf532fc73ea6b30f96081f with merge 17cff29288d7f9f1378ebd548ff5a4994de8c57c... |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
petrochenkov
commented
Apr 17, 2022
@bors try @rust-timer queue |
rust-timer
commented
Apr 17, 2022
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Apr 17, 2022
⌛ Trying commit 76077f923a7536b844a854078dcfa093524c5c27 with merge cd5dce912ebe17db000b68c530333a49ad85d462... |
bors
commented
Apr 17, 2022
☀️ Try build successful - checks-actions |
rust-timer
commented
Apr 17, 2022
Queued cd5dce912ebe17db000b68c530333a49ad85d462 with parent 1ec2c13, future comparison URL. |
rust-timer
commented
Apr 18, 2022
Finished benchmarking commit (cd5dce912ebe17db000b68c530333a49ad85d462): 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Footnotes |
Seems like you're almost done in here! :D |
petrochenkov
commented
Apr 18, 2022
@GuillaumeGomez tt-muncher seems to fluctuate a lot for reasons unrelated to this PR. |
Uh oh!
There was an error while loading. Please reload this page.
petrochenkov
commented
Apr 19, 2022
@GuillaumeGomez |
Kobzol
commented
Apr 19, 2022
Are there any specific crates in the benchmark suite that use these doc links a lot? I can try to profile them and look for potential bottlenecks. |
GuillaumeGomez
commented
Apr 19, 2022
Thanks @petrochenkov ! Let's go then. :) @bors: r+ |
bors
commented
Apr 19, 2022
📌 Commit ca5c752 has been approved by |
GuillaumeGomez
commented
Apr 19, 2022
@bors rollup=never |
petrochenkov
commented
Apr 20, 2022
bors
commented
Apr 20, 2022
bors
commented
Apr 20, 2022
☀️ Test successful - checks-actions |
rust-timer
commented
Apr 20, 2022
Finished benchmarking commit (d39864d): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Footnotes |
…nks-filtering, r=notriddle Prevent `<>` links to be interpreted for intra-doc links As discussed in [this thread](rust-lang#96135 (comment)). As mentioned, the intra-doc RFC states that `<>` links shouldn't be potential intra-doc links: https://rust-lang.github.io/rfcs/1946-intra-rustdoc-links.html#no-autolinks-style. I renamed `markdown_links` into `potential_intra_doc_markdown_links` to make it more obvious what it's doing. cc `@petrochenkov` r? `@notriddle`
rustdoc: Optimize IdMap Slightly optimizes `IdMap`, which is hot in `markdown_links` (context [here](rust-lang#96135 (comment))). There are more improvements that can be made near this place, but this seemed like an easy win locally (although I tried it on top of rust-lang#94857, so let's see what happens without that PR). r? `@petrochenkov`
rylev
commented
Apr 26, 2022
@petrochenkov said:
Given that besides that benchmark, this is a win (and sometimes a big one), I'll mark this as triaged. @rustbot label: +perf-regression-triaged |
rustdoc: Resolve doc links on fields during early resolution Another subset of rust-lang#94857 which fixesrust-lang#96429. This case regressed in rust-lang#96135 when `may_have_doc_links`-based filtering was introduced. Before that filtering structs could collect traits in scope for their fields, but after the filtering structs won't collect anything if they don't have doc comments on them, so we have to visit fields too.
rustdoc: Resolve doc links on fields during early resolution Another subset of rust-lang#94857 which fixesrust-lang#96429. This case regressed in rust-lang#96135 when `may_have_doc_links`-based filtering was introduced. Before that filtering structs could collect traits in scope for their fields, but after the filtering structs won't collect anything if they don't have doc comments on them, so we have to visit fields too.
One more subset of #94857 that should bring perf improvements rather than regressions + a couple more optimizations on top of it.
It's better to read individual commits and their descriptions to understand the changes.
The
may_have_doc_linksoptimization is not very useful here, but it's much more important for #94857.Closes#96079