Open
Bug 1373418
Opened 7 years ago
Updated 2 years ago
Reduce the amount of compartment overhead in the WebExtension framework
Categories
(WebExtensions :: General, enhancement, P3)
WebExtensions
General
Tracking
(Not tracked)
NEW
People
(Reporter: kmag, Unassigned)
References
(Depends on 1 open bug, Blocks 2 open bugs)
Details
(Whiteboard: [MemShrink:Meta][overhead:?])
We currently create a fairly large number of module globals for the WebExtensions framework. This is nice for compartmentalization, but has the side-effect of creating a lot of additional memory overhead, particularly in terms of cross-compartment wrappers.
One of the biggest culprits seems to be schema JSON data, which currently lives in the IndexedDB.jsm compartment in the parent process, or the privileged junk scope in the child, but is used mostly in Schemas.jsm. But there are plenty of other places where wrapper overhead adds up, too.
Reporter | ||
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Kris, do you have any idea of the scale of memory impact this has? In bug 1186409 we're talking megabytes.
Flags: needinfo?(kmaglione+bmo)
Reporter | ||
Updated•7 years ago
|
Blocks: webext-memory
Updated•7 years ago
|
Whiteboard: [MemShrink] → [MemShrink:P1]
Reporter | ||
Comment 2•7 years ago
|
||
(In reply to Eric Rahm [:erahm] (please no mozreview requests) from comment #1)
> Kris, do you have any idea of the scale of memory impact this has? In bug
> 1186409 we're talking megabytes.
Sorry, I don't remember the exact estimate that I came to before, but I think it was somewhere around 750K for the parent process, before OOP extensions, and some other changes that reduced a lot of our wrapper overhead.
Right now, just looking at the about:memory section for the extension content process, we have about 190K of cross-compartment-wrapper-table overhead just for our our main framework compartments. I don't remember exactly how those memory reports work, but I'm pretty sure they don't include the size of wrapper objects, but only the lookup table, which would mean actual overhead is much higher.
There's also the base per-compartment overhead, of course, and various other bits of non-wrapper compartment overhead.
Flags: needinfo?(kmaglione+bmo)
Reporter | ||
Updated•7 years ago
|
Updated•7 years ago
|
status-firefox57:
--- → fix-optional
Priority: -- → P2
Updated•6 years ago
|
Product: Toolkit → WebExtensions
Updated•6 years ago
|
status-firefox57:
fix-optional → ---
Comment 3•6 years ago
|
||
Kris, is there still work to do here?
Flags: needinfo?(kmaglione+bmo)
Whiteboard: [MemShrink:P1] → [MemShrink:P1][overhead:?]
Reporter | ||
Comment 4•6 years ago
|
||
(In reply to Eric Rahm [:erahm] from comment #3)
> Kris, is there still work to do here?
Yes. Unfortunately, we still have a Sandbox to get rid of, which is currently blocked on bug 1393270. Which... I apparently fixed and forgot about.
Flags: needinfo?(kmaglione+bmo)
Updated•6 years ago
|
Assignee: kmaglione+bmo → nobody
Updated•6 years ago
|
Whiteboard: [MemShrink:P1][overhead:?] → [MemShrink:Meta][overhead:?]
Updated•5 years ago
|
Priority: P2 → P3
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•