-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Coming from this thread
Background:
The App supports multiple languages, most of the users use fully supported EN or ES and rest of the languages are in "beta" and are AI-generated. System uses an IntlStore class that manages translation files and date-fns locales for each supported language.
Locale files are loaded via dynamic imports when the user's preferred locale is determined. The app tracks bootsplash screen performance using Sentry telemetry spans. The BootsplashVisible root span contains several child spans including BootsplashVisibleLocale, which measures the time from when locale loading begins until translations are ready for use. The bootsplash screen remains visible until multiple conditions are met and one of them is loaded locale file. Sometimes there are spikes where locale loads for >1s extending the splash screen visibility.
Let's look into production sentry logs.
Last 7 days:
- David account: avg BootsplashVisibleLocale: ~ 1.62s
- Vit account: avg BootsplashVisibleLocale: ~1.25s
Problem:
When the app starts, if dynamic imports are used for all locale files, the time to load translations increases, which may extend the splash screen duration for users.
Solution
MoveLocaleContextProvider higher up the tree as discussed here
Issue Owner
Current Issue Owner: @garrettmknightMetadata
Metadata
Labels
Type
Projects
Status