Integrate Pocket code more straightforwardly into Firefox

RESOLVED FIXED in Firefox 66

Status

()

enhancement
RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: Gijs, Assigned: Gijs)

Tracking

Trunk
Firefox 66
Points:
---

Firefox Tracking Flags

(firefox66 fixed)

Details

(Whiteboard: [fxperf:p1])

Attachments

(5 attachments, 1 obsolete attachment)

Assignee

Description

6 months ago
Currently Pocket creates a bunch of stuff dynamically at startup, and then removes it when disabled or on shutdown. Almost all the code lives in browser/components/pocket .

This is problematic from a performance perspective because it loads a bunch of stuff into content processes, and it still has a legacy cache-busting URI query so this causes disk IO on every startup. Especially on slower, spinny-disk machines, this is noticeable in startup profiles.

While having everything in 1 place is helpful when looking for pocket-specific code, it's less helpful when trying to make sure that "all toolbar buttons" or "all about pages" exhibit certain behavior. It also requires a lot of boilerplate code that can be removed when treating pocket like "any other part" of the Firefox codebase.

I'll try and streamline this in this bug. This should hopefully lead to some clean-up and some minor startup gains.
Assignee

Updated

6 months ago
Status: NEW → ASSIGNED
Assignee

Comment 5

6 months ago
x-ref https://bugzilla.mozilla.org/show_bug.cgi?id=1514906 for why there's so many updates to these patches for no real reason. Sorry about that...
Assignee

Comment 7

6 months ago
Depends on D14805
Attachment #9032029 - Attachment description: Bug 1514724 - simplify pocket reader code a bit, r?jaws → Bug 1514724 - simplify pocket reader code a bit, r?mconley
Attachment #9032025 - Attachment description: Bug 1514724 - define script getters in the browser instead of via a module and iterating over windows, r?jaws → Bug 1514724 - define script getters in the browser instead of via a module and iterating over windows, r?mconley
Attachment #9032023 - Attachment description: Bug 1514724 - set default prefs in firefox.js instead of dynamically, r?jaws → Bug 1514724 - set default prefs in firefox.js instead of dynamically, r?mconley
Attachment #9032018 - Attachment description: Bug 1514724 - register pocket about pages in the browser AboutRedirector to avoid having a process script specifically for this purpose, r?jaws!,thecount! → Bug 1514724 - register pocket about pages in the browser AboutRedirector to avoid having a process script specifically for this purpose, r?mconley!,thecount!

Comment 8

6 months ago
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6b9e37b4b8a3
register pocket about pages in the browser AboutRedirector to avoid having a process script specifically for this purpose, r=mconley,thecount
https://hg.mozilla.org/integration/mozilla-inbound/rev/edd35a2dc14e
move pocket main browser CSS into main browser files and stop checking for non-bootstrap pocket add-on, r=jaws,thecount
https://hg.mozilla.org/integration/mozilla-inbound/rev/3ad55634aa8a
move pocket page action into markup, r=jaws
https://hg.mozilla.org/integration/mozilla-inbound/rev/0fdb96690a40
set default prefs in firefox.js instead of dynamically, r=mconley
https://hg.mozilla.org/integration/mozilla-inbound/rev/c17712b31f9a
define script getters in the browser instead of via a module and iterating over windows, r=mconley

Comment 9

6 months ago
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/960719985899
actually insert pocket in the 'right' place in browser.xul to avoid migration issues in browser_pageActions.js , rs=bustage on a CLOSED TREE

Comment 10

6 months ago
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/31efc536c91f
follow-up: remove now-obsolete entry for AboutPocket.jsm from browser_startup_content.js, rs=bustage
Attachment #9032029 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.