Closed
Bug 676939
Opened 14 years ago
Closed 2 years ago
Reuse compiled scripts across pages
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1670403
People
(Reporter: jrmuizel, Unassigned)
Details
I was looking in about:memory and saw 13MB for mjit code for tbpl.mozilla.org. I expect this was because I had a lot of tbpl tabs open. It would be nice if these tabs could share what's likely the same mjit code.
I talked with shaver and he had some idea about how this might be possible.
Comment 1•14 years ago
|
||
We share jitted code within a compartment so, assuming all your tbpl.mozilla.org tabs are being properly put in the same compartment (which it sounds like they are), then we should be reusing those compiled scripts. A separate question is why tbpl generates 13MB of mjit code.
Comment 2•14 years ago
|
||
Oh wait, I'm totally wrong. Each of those pages will compile its own copy of the JSScript so while compartment-per-domain doesn't *prevent* sharing code, we aren't.
Comment 3•14 years ago
|
||
So the biggest issue I ran into last time I looked at this stuff was COMPILE_N_GO...
I don't know much about this stuff. But if COMPILE_N_GO is an issue, then I assume the tabs have different global objects. And if that's the case, then pretty soon all these scripts will be in different compartments (when we have compartment-per-global). And that will make this a lot harder.
Comment 5•14 years ago
|
||
Yes, the tabs very much have different global objects.
| Assignee | ||
Updated•11 years ago
|
Assignee: general → nobody
Updated•3 years ago
|
Severity: normal → S3
Comment 6•2 years ago
|
||
Sharing compiled scripts has become more complicated because of Electrolysis and Fission.
Current efforts revolve around sharing Stencils; see stencil-nav bug.
You need to log in
before you can comment on or make changes to this bug.
Description
•