Open Bug 1568270 Opened 1 year ago Updated 24 days ago

Make screenshots a built-in extension

Categories

(Firefox :: Screenshots, task)

task
Not set
normal

Tracking

()

ASSIGNED

People

(Reporter: aswan, Assigned: mixedpuppy)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxperf:p3])

Attachments

(1 file)

On first startup in a new profile, system addons are synchronously "installed" (the addons themselves are read from the application directory but local profile state such as addonStartup.json has to be created) early in startup. This is particularly expensive for screenshots since it bundles its translations for all supported locales.

There are lots of ways we could chip away at this but I think our best option is to use the built-in addon capability added in bug 1512436. As a first cut, we could simply move screenshots into omni.ja and, on first run, install it asynchronously after the browser UI has been painted. Note that we'll also need to handle updates when the application updates.

As a separate step, if we moved the screenshots strings out of the extension and into language packs, that would make the install/update process less expensive (and maybe it would make the l10n team's work easier by making it follow the same process the rest of the browser uses). That would entail dusting off the patches from bug 1425104.

Depends on: 1571876

this is not intended for merging but it has some minimal changes to
load screenshots from omni.ja instead of from an xpi in the features/
directory. to actually land this i think we'll need to address bug 1571876
and to get real perf wins we'll want to move the strings out of the
extension (and ideally to fluent at that time)

Actually moving screenshots from a system addon to a built-in addon is fairly simple, the attached patch should cover it. The real work here is the two dependencies. Without bug 1571876, things will be prone to break if we ever make changes to the extension, so that should get addressed before landing this. But, since a major motivation for this change is to reduce the cost of the initial "install" of screenshots, it should be switched to use strings from the app or a language pack. Ideally we would just convert to fluent at that time, that is bug 1425104.

Depends on: 1425104
Whiteboard: [fxperf]
Whiteboard: [fxperf] → [fxperf:p3]
Depends on: 1580816
No longer depends on: 1425104
Assignee: nobody → mixedpuppy
Status: NEW → ASSIGNED
You need to log in before you can comment on or make changes to this bug.