Closed Bug 1008512 Opened 10 years ago Closed 10 years ago

Save memory when passing ArrayBuffer to XHR in workers.

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1008126

People

(Reporter: swu, Unassigned)

References

Details

(Whiteboard: [MemShrink:P3])

+++ This bug was initially created as a clone of Bug #1008126 +++

When passing ArrayBuffer from main thread to worker thread XHR, currently we are cloning it by copy.  However, there could be multiple XHR events sent to worker thread, and each event produces a separate copy of ArrayBuffer.

Per discussion in bug 1008126, using structured clone transferable mechanism may not going to work, because original ArrayBuffer in main thread is lost after been transfered.  It makes the response fail by later XHR events from main thread, trying to clone a neutered ArrayBuffer.

Can we use SharedArrayBuffer(introduced in bug 933001) to save memory in this case?
CCing sstangl and sfink if you have some thoughts.
Whiteboard: [MemShrink]
Whiteboard: [MemShrink] → [MemShrink:P3]
This has been addressed by bug 1008126.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.