Closed Bug 1353816 Opened 7 years ago Closed 2 years ago

[meta] Reduce content process memory overhead from system .jsms


(Core :: JavaScript Engine, enhancement, P1)






(Reporter: mccr8, Unassigned)


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


(Keywords: meta, Whiteboard: [e10s-multi:+])

Beyond the simple effort of avoiding loading jsms, there have been a number of ideas over the years for reducing the overhead from the giant swarm of system jsms that we have in every content compartment, at the level of the JS engine.
Keywords: meta
Depends on: esm-ification
To get a sense of what overhead we could be eliminating by not having so many .jsms, I tried setting jsloader.reuseGlobal to true, then started the browser, loaded hacker news, minimized memory usage, then took a memory report.

It looked like it reduced memory usage by around 3MB to 3.5MB in a content process. You end up with a new compartment that is about 510KB, but that eliminates about 2.5MB of direct compartment memory usage. The rest is various things like shapes (280kb saved), shared-immutable-strings-cache (250kb???), various XPConnect scope stuff (190kb), lazy scripts (150kb), object-groups/gc-heap (110kb), layout/rule-processor-cache (100kb???), shape tables (90kb), type-pool (40kb), unique id map (40kb), unused gc things (30kb).
I should add the disclaimer that there are a lot of error messages when I do that, so some memory savings could be from things failing to load.
Depends on: 1364559
Whiteboard: [e10s-multi:+]
Priority: -- → P1
Keywords: stale-bug
Depends on: 1381961
Summary: Reduce content process memory overhead from system .jsms → [meta] Reduce content process memory overhead from system .jsms
No longer depends on: esm-ification
No longer depends on: 1348133

This is a rather inactive meta bug, so I'll just go ahead and close it.

Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.