Open Bug 987955 Opened 11 years ago Updated 1 year ago

Figure out how much we could save by sharing bytecode/sources per-process

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

People

(Reporter: terrence, Unassigned)

References

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

Details

(Whiteboard: [e10s-multi:+][MemShrink:P1])

For something like jquery, we probably have hundreds of copies of identical sources in different compartments. We should check on AWSY or membuster to see how much could be saved in practice by sharing identical code.
Since bug 679940, we share bytecode per-runtime. Script sources have a very similar model (I just don't have the bug number handy). What'd be nice is to extend this to per-process sharing, and it doesn't seem too hard. I'm morphing this bug to be about that.
Component: JavaScript: GC → JavaScript Engine
Summary: Figure out how much we could save by sharing bytecode/sources → Figure out how much we could save by sharing bytecode/sources per-process
Are there any plans to work on this? It seems pretty useful for e10s-multi as we crank up the number of content processes.
Whiteboard: [e10s-multi][MemShrink]
I don't have any plans or the time to work on this. Brian, can you give an assessment of the feasibility here?
Flags: needinfo?(bhackett1024)
Oh, I just see that this is essentially bug 1315757, part 2, and Brian is already needinfo'd on that.
Depends on: 1315757
Flags: needinfo?(bhackett1024)
Whiteboard: [e10s-multi][MemShrink] → [e10s-multi:?][MemShrink]
Whiteboard: [e10s-multi:?][MemShrink] → [e10s-multi:+][MemShrink]
Whiteboard: [e10s-multi:+][MemShrink] → [e10s-multi:+][MemShrink:P1]
Ted, do you know how this fits into our content memshrink work? Is it being duplicated elsewhere or are we taking a different approach.
Flags: needinfo?(tcampbell)

Ted, can this get duped to the bytecode sharing thing you are working on?

We are handling self-hosted code in Bug 1458339, and various chrome code in Bug 1523749. What is proposed here would extend to content and is outside the Fission memshrink M1 target (if I remember correctly). It is still interesting.

In the meanwhile, we have split the Atoms from the rest of the data in SharedScriptData so that ImmutableScriptData is now fully immutable and in theory can be shared across processes if we had reasonable heuristics for when things are likely to be shared and worth the IPC.

Regarding Bug 1315757 (to share atoms): It would probably make sense to revisit this if/when we clean up static atoms in the engine which looked a bit complex when we last checked.

Flags: needinfo?(tcampbell)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.