W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: Is BlobBuilder needed?

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 24 Oct 2011 16:15:21 -0700
Message-ID: <CA+c2ei-vGesUquLAjfDtWnb=rD4vdOaCp3ZZwNVHsKAD9eOmAw@mail.gmail.com>
To: Ojan Vafai <ojan@chromium.org>
Cc: Webapps WG <public-webapps@w3.org>, Eric Uhrhane <ericu@google.com>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:48 GMT