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

Queryify is_doc_hidden #94897

Merged
merged 1 commit into from
Mar 13, 2022
Merged

Queryify is_doc_hidden #94897

merged 1 commit into from
Mar 13, 2022

Conversation

camelid
Copy link
Member

@camelid camelid commented Mar 12, 2022

It came up hot on some profiling of rustdoc I did, so hopefully turning
it into a query will help.

It came up hot on some profiling of rustdoc I did, so hopefully turning
it into a query will help.
@camelid camelid 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 Mar 12, 2022
@rust-highfive
Copy link
Collaborator

r? @estebank

(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 Mar 12, 2022
@camelid
Copy link
Member Author

camelid commented Mar 12, 2022

r? @cjgillot
cc @GuillaumeGomez

@rust-highfive rust-highfive assigned cjgillot and unassigned estebank Mar 12, 2022
@camelid
Copy link
Member Author

camelid commented Mar 12, 2022

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

bors commented Mar 12, 2022

⌛ Trying commit f39d0fc with merge 7466c2b2229204dd713077a6418bfbacfbd09cc4...

@bors
Copy link
Contributor

bors commented Mar 12, 2022

☀️ Try build successful - checks-actions
Build commit: 7466c2b2229204dd713077a6418bfbacfbd09cc4 (7466c2b2229204dd713077a6418bfbacfbd09cc4)

@rust-timer
Copy link
Collaborator

Queued 7466c2b2229204dd713077a6418bfbacfbd09cc4 with parent f103b29, future comparison URL.

pub fn provide(providers: &mut ty::query::Providers) {
*providers = ty::query::Providers { normalize_opaque_types, ..*providers }
*providers = ty::query::Providers { normalize_opaque_types, is_doc_hidden, ..*providers }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this only provides it for the local crate I think, you should double check it doesn't crash on external crates

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, I didn't realize that, thanks!

Copy link
Contributor

@cjgillot cjgillot Mar 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The distinction between local and extern query providers only exists if the query is marked separate_provide_extern. This query is not marked as such, so this implementation will be called for both the local crate and extern crates.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7466c2b2229204dd713077a6418bfbacfbd09cc4): comparison url.

Summary: This benchmark run shows 43 relevant improvements 🎉 to instruction counts.

  • Arithmetic mean of relevant improvements: -0.7%
  • Largest improvement in instruction counts: -1.1% on full builds of projection-caching doc

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.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 13, 2022
@cjgillot
Copy link
Contributor

The handling of attributes, implemented using a iter().filter seems generally inefficient. I filed #94905 to have it refactored.
Meanwhile, this looks good, with a decent perf improvement. Great!
@bors r+

@bors
Copy link
Contributor

bors commented Mar 13, 2022

📌 Commit f39d0fc has been approved by cjgillot

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

bors commented Mar 13, 2022

⌛ Testing commit f39d0fc with merge 4800c78...

@bors
Copy link
Contributor

bors commented Mar 13, 2022

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing 4800c78 to master...

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

Finished benchmarking commit (4800c78): comparison url.

Summary: This benchmark run shows 40 relevant improvements 🎉 to instruction counts.

  • Arithmetic mean of relevant improvements: -0.7%
  • Largest improvement in instruction counts: -1.1% on full builds of projection-caching doc

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

@rustbot label: -perf-regression

@camelid camelid deleted the query-doc-hidden branch March 13, 2022 17:56
camelid added a commit to camelid/rust that referenced this pull request Jun 30, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 30, 2024
Queryify `has_attr` to improve performance

Inspired by rust-lang#127144 (review)
and previous success in rust-lang#94897.

r? `@compiler-errors`
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. 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