Closed Bug 1312412 Opened 8 years ago Closed 8 years ago

WebSocket should reuse XHR's 'store large blobs in temp files' -setup

Categories

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

50 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: smaug, Assigned: baku)

References

Details

Attachments

(1 file)

Depends on: 1202006
Assignee: nobody → amarchesini
For how WebSocket works, we don't append any data in order to create a blob but, what we receive, is the blob content. That content is a nsCString. Instead doing what you are proposing, I want to implement a BlobImplString so that we don't duplicate the string when the Blob is created.
But could we store huge data still in temp files to reduce memory usage?
Attached patch ws.patch (deleted) — Splinter Review
I would like to mark bug 704447 as duplicate of this.
Attachment #8803904 - Flags: review?(bugs)
Isn't bug 704447 about sending. This is about receiving messages.
> But could we store huge data still in temp files to reduce memory usage? Right. So, with this patch, we still have less duplicate memory because we reuse the string logic. About bug 704447, we should implement a similar MutableBlobStorage class in necko. Just because we have bug 704447, are you OK with me implementing this in that bug instead here?
Not sure I understand how bug 704447 and this one are connected. Or would you do all file-backed blob handling in Necko or something? (I don't care too much which bug is used, but as of now bug 704447 is about sending and this one is about receiving message and I was imaging they to be distinct enough things that they should be handled separately).
I guess we could take this string sharing patch anyhow. That should help with smaller blobs, those which won't be using temporary files.
Attachment #8803904 - Flags: review?(bugs) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: