Closed Bug 1168981 Opened 9 years ago Closed 5 years ago

OdinMonkey: share asm.js code between workers

Categories

(Core :: JavaScript: WebAssembly, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: luke, Unassigned)

Details

This work breaks down into two main pieces:
 - compile thread- (and thus JSRuntime-) independent code by indirecting through TLS (via the pinned GlobalReg) where necessary
 - improve dom/asmjscache so that simultaneous and staggered compilation requests for the same asm.js code can share compiled code
In the above test case, each worker consumes 15.25MB of compiled asm.js memory, so the estimated waste in that case is 16*15.25MB = 244 MB of memory. (see bug 1244845 and bug 1244841 for related items on about:memory for this test page)

Luke mentions a method in comment 0 for fixing this. How difficult is this? It's been a while since that comment, what's the latest thinking here?
I looked into doing this a while back and while it's quite possible, it's not super-easy.  I don't have the bandwidth to do this at the moment.  I'll note that wasm threads would share the code by construction and, if other browsers ship SAB, they will have the same code duplication, so the priority of this bug is a question of whether devs will ship many-Worker asm.js+SAB or just wait for wasm.
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Status: RESOLVED → REOPENED
Resolution: INACTIVE → ---
Component: JavaScript Engine → Javascript: WebAssembly

Wasm is now here. Closing as wontfix, considering this was a proposal for asm.js, but you can consider it fixed as it's implemented in wasm.

Status: REOPENED → RESOLVED
Closed: 6 years ago5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.