Repository navigation
fix(mobile): reuse the locale when formatting thread labels - #93
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a Samsung running Skald Code 2.3.0 (Android build 1008019), 9.8% of app CPU samples during thread navigation and scrolling passed through
Intl.NumberFormat.supportedLocalesOfon the JavaScript thread. The ICU formatter repeated the same language lookup for each label.Cache the last ordered locale list and its resolved locale in both entry points of
@generaltranslation/icu. A language change triggers a fresh lookup. The regression test exercises the mobile translation API and checks that switching between US English and French still changes the displayed hour format.On-device verification
Formatting the same 300 labels on the same phone took 154.8 and 162.3 ms before the patch, and 1.6 and 3.6 ms after it. Both versions produced the same output checksum. Scrolling, opening a thread, and returning to the list were also verified in a separate Android client. The occasional half-second pause did not recur during tracing and its cause remains open.
All 71 focused tests and
vp run check:changed origin/atlipassed.GPT-6.2-astra via the Codex harness in T3 Code.