Open
Bug 945166
Opened 11 years ago
Updated 2 years ago
Merge JS bytecode, jit code, type tree and shape tree of iframes of embedded YouTube videos.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
REOPENED
People
(Reporter: sinker, Unassigned)
References
Details
(Whiteboard: [platform-rel-Youtube])
Attachments
(1 file)
898.85 KB,
text/plain
|
Details |
Story: It is very common to embed video from YouTube on pages. For some web sites a page may embed several YouTube videos. Every embedded video create an iframe. These iframes are supposed to load the same set of JS codes. Bytecode, jit code, type tree and shape tree should be exactly/or almost the same. They could be shared, but it is not in reality. Solution: Bytecode is exactly the same for the same JS file. For jit code, type tree and shape tree, they are very similar among the iframes, but may be not exactly the same. Although there are minor different, spidermonkey is designed to handle these different among JSObjects to generate multiple verions of jit code. So, it is possible to share jit code, type tree and shape tree among iframes of embedded YouTube videos.
Comment 1•11 years ago
|
||
The sizes of data structures are very close to each other; The style-sheets are exactly of the same size: 1,082,776 B (02.34%) ── style-sheets
Comment 2•11 years ago
|
||
I think we have a similar bug already.
Reporter | ||
Comment 3•11 years ago
|
||
Yes! After your reminding, I find bug 846173 mentioned exactly the same issue, but no solution or any progress there. I suggest to identify iframes of this type by comparing the digest and URI of JS code. Then, the iframe could reuse script, bytecode, jit code, type objects and shapes of another iframe once the document is full loaded. For b2g is very different from desktop, in the case of youtube, shapes are major duplication among iframes (0.56MB per iframe). style-sheets would be modified by the JS code, it needs some kind of COW that is not easy to implement. (map the list of the same pages to multiple location privately?)
Updated•11 years ago
|
Whiteboard: [tarako]
Component: General → JavaScript Engine
Product: Firefox OS → Core
Comment 4•11 years ago
|
||
Dito here. We can't block days before FC date on brand new features.
Comment 5•11 years ago
|
||
Don't we share the bytecode already? I certainly thought we did...
Comment 6•11 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #5) > Don't we share the bytecode already? I certainly thought we did... We do: bug 679940. The other things are interesting, but much harder to implement, as pointers to per-compartment data structures are baked in.
Comment 7•11 years ago
|
||
triage: this bug is not likely to be in time for 1.3. clear the flag and work on this on trunk
blocking-b2g: 1.3? → ---
Updated•10 years ago
|
Whiteboard: [tarako] → [tarako-p2]
Comment 8•10 years ago
|
||
triage: remove [tarako]. not going to be in time for tarako timeframe
Whiteboard: [tarako-p2]
Updated•8 years ago
|
platform-rel: --- → ?
Updated•8 years ago
|
Whiteboard: [platform-rel-Youtube]
Updated•7 years ago
|
platform-rel: ? → ---
Comment 9•7 years ago
|
||
Mass-closing JS bugs for which the platform is Gonk (Firefox OS), since Firefox OS is gone. Feel free to re-open if still valid. (plus it seems partially addressed by the bytecode cache)
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Comment 10•7 years ago
|
||
This still seems valid, and should be made easier in terms of the per-compartment stuff mentioned above by the work Jason is doing...
Status: RESOLVED → REOPENED
OS: Gonk (Firefox OS) → All
Resolution: WONTFIX → ---
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•