Skip to content

[Due for payment 2026-01-09] Optimize loading EN/ES translations #78515

@mountiny

Description

@mountiny

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 OwnerCurrent Issue Owner: @garrettmknight

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.WeeklyKSv2

Type

No type

Projects

Status

AWAITING DEPLOYMENT

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions