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

Re: Is BlobBuilder needed?

From: ATSUSHI TAKAYAMA <taka.atsushi@googlemail.com>
Date: Thu, 27 Oct 2011 12:42:46 -0400
Message-ID: <CANmZ7J5nJa7by=vg-spR1nqrfaCtuitPW6JCCic1jNySS2aywA@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: Webapps WG <public-webapps@w3.org>
I see. Thanks Glenn.


On Thu, Oct 27, 2011 at 12:30 PM, Glenn Maynard <glenn@zewt.org> wrote:
> On Thu, Oct 27, 2011 at 11:51 AM, ATSUSHI TAKAYAMA
> <taka.atsushi@googlemail.com> wrote:
>> So converting Blob to ArrayBuffer is only supported through an
>> asynchronous API (FileReader's readAsArrayBuffer) except in Workers,
>> but the other way round is synchronous? I thought the direction of the
>> client side web was to make all API's that might involve disk access
>> asynchronous.
> Creating a Blob can be synchronous because it doesn't actually (visibly)
> copy or move any data around--that doesn't happen until you actually try to
> do something with the data, and all APIs to do *that* are async.
> Even if an implementation needs to hit the disk to make a Blob out of an
> ArrayBuffer for some reason, it doesn't have to wait for that to complete
> before returning the Blob.  It can just return the Blob and complete the
> copy asynchronously, since it already knows everything it needs to about the
> Blob (its size) in order to return it.
> --
> Glenn Maynard
Received on Thursday, 27 October 2011 16:43:35 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:36 UTC