Closed Bug 1149592 Opened 9 years ago Closed 6 years ago

Preload l10n.js and l10n_date.js

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ferjm, Unassigned)

Details

While working on bug 1112551 we realized that loading l10n.js and l10n_date.js takes a considerable amount of time. I need to measure it again, but IIRC it was ~200ms.

If we could preload these two scripts for all Gaia apps, I believe that we will be improving the start up time of our apps.

We could create an iframe mozapps in the System app before getting the 'webapps-launch' event and inject these two scripts there. Once we get the webapps-launch event, we just need to use that iframe to host the app being launched.

Because not every app needs l10n, we also need a way to opt-in for this preload. I think we can add an entry in the manifest specifying that an app has the l10n dependency. If the app being launched doesn't specify this dependency, we won't be using the pre-created iframe.
Actually, we don't even need to add that manifest entry. We already have the "locales" one.
Assignee: nobody → ferjmoreno
Assignee: ferjmoreno → nobody
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.