-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Disable visible path calculation for PrettyPrinter in Ok path of compiler #89120
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
Disable visible path calculation for PrettyPrinter in Ok path of compiler #89120
Conversation
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
2185321
to
f6fc978
Compare
Please, kindly schedule a perf run |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit f6fc9789d728bb1df6a90e50ebfcfa18aa670224 with merge 4bf6e5c32905d0f765eab7c792a5e1a72f9afee1... |
☀️ Try build successful - checks-actions |
Queued 4bf6e5c32905d0f765eab7c792a5e1a72f9afee1 with parent db1fb85, future comparison URL. |
f6fc978
to
a250406
Compare
I forgot to commit main check, sorry! Please cancel scheduled perf run and redo it 😄 |
This comment has been minimized.
This comment has been minimized.
a250406
to
4ea4144
Compare
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (4bf6e5c32905d0f765eab7c792a5e1a72f9afee1): comparison url. Summary: This change led to small relevant mixed results 🤷 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 |
4ea4144
to
9da27f0
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 9da27f0 with merge 635ba4d6ff55c13d3f40dd9b82d773d172377606... |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
☀️ Try build successful - checks-actions |
Queued 635ba4d6ff55c13d3f40dd9b82d773d172377606 with parent 60e70cc, future comparison URL. |
Finished benchmarking commit (635ba4d6ff55c13d3f40dd9b82d773d172377606): comparison url. Summary: This change led to very large relevant improvements 🎉 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. @bors rollup=never |
There are multiple benchmarks in rustc-perf, which generate a lot of warnings. Even a single warning which will print the visible path of type will invoke This explains a lot of neutral results. I think we have a few questions now.
For more information on impact to user, you can check out changed tests output. |
Wow, this is a really amazing perf improvement! Definitely don't worry about the one or two regressions, this is really good :) My only concern is the diagnostic regressions - I'm worried it will be confusing to get errors about items that aren't publicly visible. Maybe we could change those error paths to call try_print_visible_def_path explicitly? |
This seems fine to me - it should only be shown in ICE messages and logging anyway. |
The query description is shown in cycle errors (as can be observed with the test result changes). I think it is unfortunate to regress there. Could we check performance impact without that change? I'd guess that it is the primary contributor here, but would be happy to be surprised. |
Performance improvement comes from removal of `visible_parent_map`.
Even one `def_path_str` call will execute this query.
I think the solution should be to calculate description lazily.
-------- Original Message --------
…On Sep 21, 2021, 19:12, Mark Rousskov wrote:
The query description is shown in cycle errors (as can be observed with the test result changes). I think it is unfortunate to regress there. Could we check performance impact without that change? I'd guess that it is the primary contributor here, but would be happy to be surprised.
—
You are receiving this because you authored the thread.
Reply to this email directly, [view it on GitHub](#89120 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AETPTKHPBRUIWFUZC7P5FKLUDCOEXANCNFSM5EMKN64A).
Triage notifications on the go with GitHub Mobile for [iOS](https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or [Android](https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub).
|
I think those regressions are unfortunate, but not terrible. We've had much worse diagnostic regressions in the past. As long as we have a plan, or at least a ticket to address these, I'm ok with taking that hit. (My gut tells me that cycle errors aren't as common, and if a newcomer hits them they type's paths will not be in the top 3 things that confuse them about these.) |
@bors r+ |
📌 Commit 9da27f0 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (197fc85): comparison url. Summary: This change led to very large relevant improvements 🎉 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
No description provided.