Open Bug 1620447 Opened 4 years ago Updated 9 months ago

600ms are spent inside Schemas.jsm during startup


(WebExtensions :: General, defect, P3)



(Not tracked)


(Reporter: mstange, Unassigned)


(Depends on 2 open bugs, Blocks 1 open bug)


(Whiteboard: [geckoview:p2])


In this profile of Fenix app link startup (see instructions) from a Moto G5, around 600ms are spent inside Schemas.jsm in the parent process, and another 160ms in the content process.

This is extension stuff, so moving there.

Component: Extensions → General
Product: GeckoView → WebExtensions
Whiteboard: [geckoview]

kmag proposed rewriting this code in C++ in bug 1543777

See Also: → 1543777

Everything related to performance we have been optimizing in the last couple of years has been in deferring doing this work as late as possible for the common case, which is "no installed extensions" or at least "no content script in the first/every tab needing to wake up the background page (early)". However, my understanding is that Fenix is currently using several extensions, with content scripts in every page, for specific browser features like favicons.

We don't have fix for this in the short term, so the general advice of avoiding/delaying any extensions code running on startup should be attempted here as well.

Additionally, Luca is currently exploring converting our binding to webidl for the purposes of background service workers (manifest v3) in bug 1609923, but that's very much a long-term project.

Depends on: 1609923
Priority: -- → P3
Whiteboard: [geckoview] → [geckoview:p2]
See Also: → 1689733
Depends on: 1722500
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.