Consider limiting parsing only locales in the current locale fallback chain at startup

RESOLVED WORKSFORME

Status

()

Toolkit
WebExtensions: General
RESOLVED WORKSFORME
a month ago
a month ago

People

(Reporter: gandalf, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a month ago
Currently, it seems that when Gecko loads a WebExtension it loads all available locale resources for all locales and parses them eagerly.

But then, during runtime, it only uses locale resources for locales in the locale fallback chain.

It seems like a simple optimization would be to only load/parse data for locales that are in the fallback chain, and invalidate/reload on `intl:app-locales-changed`.

It may be a pretty significant win in cases where users are installing extensions with, say, 100 locales, but their fallback chain will usually be max 2 locales.
No, we parse all locales at install time, but we only load active locales at startup.
Status: NEW → RESOLVED
Last Resolved: a month ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.