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

errors: lazily load fallback fluent bundle #95968

Merged
merged 1 commit into from
Apr 13, 2022

Conversation

davidtwco
Copy link
Member

Addresses (hopefully) #95667 (comment).

Loading the fallback bundle in compilation sessions that won't go on to emit any errors unnecessarily degrades compile time performance, so lazily create the Fluent bundle when it is first required.

r? @ghost (just for perf initially)

@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 12, 2022
@rylev
Copy link
Member

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

bors commented Apr 12, 2022

⌛ Trying commit fdcd272f01469f270f7ea38057503953e109e78b with merge 9dc3dee37922f95ff26fc636c1692ebabd993816...

@bors
Copy link
Contributor

bors commented Apr 12, 2022

☀️ Try build successful - checks-actions
Build commit: 9dc3dee37922f95ff26fc636c1692ebabd993816 (9dc3dee37922f95ff26fc636c1692ebabd993816)

@rust-timer
Copy link
Collaborator

Queued 9dc3dee37922f95ff26fc636c1692ebabd993816 with parent 4e1927d, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9dc3dee37922f95ff26fc636c1692ebabd993816): comparison url.

Summary:

  • Primary benchmarks: 🎉 relevant improvements found
  • Secondary benchmarks: 🎉 relevant improvements found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 0 14 23 14
mean2 N/A N/A -3.6% -3.6% -3.6%
max N/A N/A -10.5% -5.5% -10.5%

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.

@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 S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Apr 12, 2022
@rylev
Copy link
Member

rylev commented Apr 12, 2022

This looks great! 🎉 If we compare this change to the perf right before the fluent change was added we're at a slight perf improvement overall, and when only primary benchmarks are looked at, the improvements are even better. I definitely think we're going to want to ship this.

@davidtwco
Copy link
Member Author

r? @oli-obk

@oli-obk
Copy link
Contributor

oli-obk commented Apr 12, 2022

@bors r+ nice! Also love the use of type alias impl trait

@bors
Copy link
Contributor

bors commented Apr 12, 2022

📌 Commit fdcd272f01469f270f7ea38057503953e109e78b has been approved by oli-obk

@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 12, 2022
@bors

This comment was marked as resolved.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 12, 2022
@rust-log-analyzer

This comment was marked as resolved.

Loading the fallback bundle in compilation sessions that won't go on to
emit any errors unnecessarily degrades compile time performance, so
lazily create the Fluent bundle when it is first required.

Signed-off-by: David Wood <david.wood@huawei.com>
@davidtwco
Copy link
Member Author

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Apr 13, 2022

📌 Commit 9bfe0e3 has been approved by oli-obk

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 13, 2022
@bors
Copy link
Contributor

bors commented Apr 13, 2022

⌛ Testing commit 9bfe0e3 with merge 34a6c9f...

@bors
Copy link
Contributor

bors commented Apr 13, 2022

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 34a6c9f to master...

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

📣 Toolstate changed by #95968!

Tested on commit 34a6c9f.
Direct link to PR: #95968

💔 rls on windows: test-pass → build-fail (cc @Xanewok).
💔 rls on linux: test-pass → build-fail (cc @Xanewok).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Apr 13, 2022
Tested on commit rust-lang/rust@34a6c9f.
Direct link to PR: <rust-lang/rust#95968>

💔 rls on windows: test-pass → build-fail (cc @Xanewok).
💔 rls on linux: test-pass → build-fail (cc @Xanewok).
@davidtwco davidtwco deleted the translation-lazy-fallback branch April 14, 2022 00:39
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (34a6c9f): comparison url.

Summary:

  • Primary benchmarks: 🎉 relevant improvements found
  • Secondary benchmarks: 🎉 relevant improvements found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 0 19 30 19
mean2 N/A N/A -2.7% -2.9% -2.7%
max N/A N/A -10.4% -5.2% -10.4%

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

@rustbot label: -perf-regression

Footnotes

  1. number of relevant changes

  2. the arithmetic mean of the percent change

@the8472
Copy link
Member

the8472 commented Apr 19, 2022

Note that this does not recover the 15s bootstrap performance regression from #95667

https://perf.rust-lang.org/bootstrap.html

@davidtwco
Copy link
Member Author

Note that this does not recover the 15s bootstrap performance regression from #95667

perf.rust-lang.org/bootstrap.html

I didn't expect it to, that comes from the new dependencies, we'd need to go look at making those compile faster or reducing their number.

flip1995 pushed a commit to flip1995/rust that referenced this pull request Apr 21, 2022
…r=oli-obk

errors: lazily load fallback fluent bundle

Addresses (hopefully) rust-lang#95667 (comment).

Loading the fallback bundle in compilation sessions that won't go on to emit any errors unnecessarily degrades compile time performance, so lazily create the Fluent bundle when it is first required.

r? `@ghost` (just for perf initially)
@compiler-errors compiler-errors added the A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic label Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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.

10 participants