Uh oh!
There was an error while loading. Please reload this page.
rustdoc: Pre-calculate traits that are in scope for doc links - #88679
Conversation
rust-highfive
commented
Sep 5, 2021
Some changes occurred in intra-doc-links. cc @jyn514 Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
jyn514
commented
Sep 6, 2021
@bors try @rust-timer queue Since encoding and decoding are performance sensitive. |
rust-timer
commented
Sep 6, 2021
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Sep 6, 2021
⌛ Trying commit 1514df2159ed22849eaddfd75c5e57cf801de6d4 with merge 2aadece0d9989be6855d4e96bac0f4ec08f23c91... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
mati865
commented
Sep 12, 2021
Typo? #88679 is this PR. |
1514df2 to
1ed1f29Comparepetrochenkov
commented
Sep 16, 2021
@bors try @rust-timer queue |
rust-timer
commented
Sep 16, 2021
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Sep 16, 2021
⌛ Trying commit 1ed1f29e01aedafd3a4dcb253de4be5da9a9eade with merge eec63217b0c2bd2bd82596fe0f8f6ccc5b9cc1a0... |
bors
commented
Jan 25, 2022
☀️ Try build successful - checks-actions |
rust-timer
commented
Jan 25, 2022
Queued 25308acc28ea882d78437b7fe14d09b78b93277b with parent e7825f2, future comparison URL. |
rust-timer
commented
Jan 25, 2022
Finished benchmarking commit (25308acc28ea882d78437b7fe14d09b78b93277b): comparison url. Summary: This change led to large relevant regressions 😿 in compiler performance.
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 led 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 |
This #88679 (comment) is the result of implementing that suggestion. I'll save the optimization on a branch (https://github.com/petrochenkov/rust/tree/doctrscope4), but I don't want to land it now, because this PR is an intermediate step and I want to finish the whole resolver cloning removal before starting to encode more data for rustdoc, maybe we'll have different bottlenecks and need a different set of data in the end. |
This eliminates one more late use of resolver
camelid
commented
Jan 25, 2022
I still feel a bit uncomfortable with landing such a large regression, but I won't block this since I understand that it's an important refactoring. I'll let Guillaume take it from here. |
GuillaumeGomez
commented
Jan 25, 2022
@petrochenkov Let's go with this then. Can you open an issue with the next steps please (with explanations too, it'd be very much appreciated!). Once done, r=me. Thanks a lot for working on this! |
petrochenkov
commented
Jan 26, 2022
@GuillaumeGomez @bors r=GuillaumeGomez |
bors
commented
Jan 26, 2022
📌 Commit 00ba815 has been approved by |
bors
commented
Jan 26, 2022
bors
commented
Jan 26, 2022
☀️ Test successful - checks-actions |
rust-timer
commented
Jan 26, 2022
Finished benchmarking commit (788b1fe): comparison url. Summary: This benchmark run shows 43 relevant regressions 😿 to instruction counts.
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 |
trevyn
commented
Jan 28, 2022
@petrochenkov FYI, this seems to have broken one of my nightly CI runs, not sure if that's expected: https://github.com/trevyn/turbosql/runs/4960657119?check_suite_focus=true |
petrochenkov
commented
Jan 28, 2022
@trevyn |
trevyn
commented
Jan 28, 2022
Ok, apparently this is enough to trigger it on my side, not sure I feel like minimizing Cargo.toml: [package]
edition = "2018"name = "test"version = "0.1.0"
[dependencies]
rusqlite = "0.26"lib.rs: use rusqlite; |
jyn514
commented
Jan 28, 2022
petrochenkov
commented
Jan 29, 2022
The panic in #88679 (comment) happens because an inherent impl from How is that even possible? |
camelid
commented
Jan 29, 2022
I think it would happen if |
petrochenkov
commented
Jan 30, 2022
Maybe it's inlined internally, but it doesn't end up in the generated doc. |
camelid
commented
Jan 31, 2022
Weird. I have no idea why that impl is being inlined then. |
petrochenkov
commented
Feb 1, 2022
I didn't figure out why that specific impl was inlined, but there are legitimate cases where inherent impls are inlined correctly, but traits in scope are not collected for them: // Dependency crate#[derive(Clone)]pubstructPublicStruct;mod inner {usesuper::PublicStruct;implPublicStruct{/// [PublicStruct::clone]pubfnmethod(){}}}// Main cratepubuse dependency::PublicStruct; |
petrochenkov
commented
Feb 1, 2022
Both cases (#88679 (comment) and #88679 (comment)) are fixed in #93539. |
This eliminates one more late use of resolver (part of #83761).
At early doc link resolution time we go through parent modules of items from the current crate, reexports of items from other crates, trait items, and impl items collected by
collect-intra-doc-linkspass, determine traits that are in scope in each such module, and put those traits into a map used by later rustdoc passes.r? @jyn514