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: Early doc link resolution fixes and refactorings #95706

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented Apr 5, 2022

A subset of #94857 that shouldn't cause perf regressions, but should fix some issues like https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/ICE.20in.20collect_intra_doc_links.2Ers #95290 and improve performance in cases like #95694.

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

r? @CraftSpider

(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 5, 2022
@petrochenkov
Copy link
Contributor Author

@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 5, 2022
@bors
Copy link
Contributor

bors commented Apr 5, 2022

⌛ Trying commit 697671ac9cda4349a0f5206a78dc35d272cf1d9b with merge 13f762ccecab1900eabf65ab6fa5ae78cd4ccbc9...

@bors
Copy link
Contributor

bors commented Apr 6, 2022

☀️ Try build successful - checks-actions
Build commit: 13f762ccecab1900eabf65ab6fa5ae78cd4ccbc9 (13f762ccecab1900eabf65ab6fa5ae78cd4ccbc9)

@rust-timer
Copy link
Collaborator

Queued 13f762ccecab1900eabf65ab6fa5ae78cd4ccbc9 with parent 306ba83, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (13f762ccecab1900eabf65ab6fa5ae78cd4ccbc9): comparison url.

Summary:

  • Primary benchmarks: mixed results
  • Secondary benchmarks: mixed results
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 2 6 3 10 5
mean2 0.3% 1.1% -6.8% -7.5% -3.9%
max 0.4% 1.2% -11.0% -10.9% -11.0%

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 @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@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 added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Apr 6, 2022
@petrochenkov
Copy link
Contributor Author

Not all performance is recovered.

The full condition on import inlining is denied in fn clean_use_statement.
It's pretty complex but the is_visible_from_parent_mod component can easily be used in early.rs for further pruning the set of imports we need to process.
Other conditions are rare and shouldn't affect performance on average.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 6, 2022
@GuillaumeGomez
Copy link
Member

Thanks for this first improvement! Is the PR ready or not yet? If so r=me. Also, do you have ideas on how to fix the remaining perf regression?

@petrochenkov
Copy link
Contributor Author

Also, do you have ideas on how to fix the remaining perf regression?

I plan to update this PR with the idea from #95706 (comment) today or tomorrow.

@petrochenkov
Copy link
Contributor Author

@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 6, 2022
@bors
Copy link
Contributor

bors commented Apr 6, 2022

⌛ Trying commit c8533c4dee61af0f072fabe3b87b5587753cb574 with merge 485ca962440957eddb01b364518f86ecc24fef25...

@petrochenkov petrochenkov removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 6, 2022
@rustbot rustbot removed the perf-regression Performance regression. label Apr 6, 2022
@petrochenkov
Copy link
Contributor Author

Yep, this recovers the performance.
@RutBot ready

@petrochenkov
Copy link
Contributor Author

If backporting is required then the part inside fn process_module_children_or_reexports can be backported in isolation.

@GuillaumeGomez
Copy link
Member

It's awesome, thanks a lot!

@bors: r+

@bors
Copy link
Contributor

bors commented Apr 7, 2022

📌 Commit 69d6c3b 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 7, 2022
@GuillaumeGomez
Copy link
Member

@bors: rollup=never

@bors
Copy link
Contributor

bors commented Apr 7, 2022

⌛ Testing commit 69d6c3b with merge e1283c752979d0b9a1e26b370e80ca328ce8acdd...

@bors
Copy link
Contributor

bors commented Apr 7, 2022

💔 Test failed - checks-actions

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

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
.......... (60/62)
.         (62/62)


/checkout/src/test/rustdoc-gui/search-result-display.goml search-result-display... FAILED
[ERROR] (line 5) TimeoutError: waiting for selector "#search-settings" failed: timeout 30000ms exceeded: for command `wait-for: "#search-settings"`
Build completed unsuccessfully in 0:00:45

@petrochenkov
Copy link
Contributor Author

Error: (line 5) TimeoutError: waiting for selector "#search-settings" failed: timeout 30000ms exceeded: for command wait-for: "#search-settings"

Looks spurious.
@bors retry

@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 7, 2022
@bors
Copy link
Contributor

bors commented Apr 7, 2022

⌛ Testing commit 69d6c3b with merge dd38eea...

@bors
Copy link
Contributor

bors commented Apr 7, 2022

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

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

Finished benchmarking commit (dd38eea): comparison url.

Summary:

  • Primary benchmarks: mixed results
  • Secondary benchmarks: mixed results
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 2 6 3 10 5
mean2 0.4% 1.2% -13.9% -16.4% -8.2%
max 0.4% 1.3% -24.5% -24.3% -24.5%

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-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression

Footnotes

  1. number of relevant changes

  2. the arithmetic mean of the percent change

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 Performance regression. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

8 participants