Re: Is BlobBuilder needed?

On Mon, Oct 24, 2011 at 4:01 PM, Ojan Vafai <ojan@chromium.org> wrote:
> In theory, a BlobBuilder could be backed by a file on disk, no? The
> advantage is that if you're building something very large, you don't
> necessarily need to be using all that memory. You can imagine a UA having
> Blobs be fully in-memory until they cross some size threshold.

It does seem like something of an edge case to add a very big string
or arraybuffer and then keep the BlobBuilder alive for long enough
after that that both the string/arraybuffer is otherwise GC'ed, *and*
that that memory usage is an issue.

Worst case you can always change

x.push(mylargestring);

into

x.push(new Blob(mylargestring));

and then the UA should be able to do the same optimization.

/ Jonas

Received on Monday, 24 October 2011 23:16:20 UTC