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

Re: XHR responseArrayBuffer attribute: suggestion to replace "asBlob" with "responseType"

From: Chris Marrin <cmarrin@apple.com>
Date: Wed, 27 Oct 2010 10:13:53 -0700
Cc: Darin Fisher <darin@chromium.org>, Anne van Kesteren <annevk@opera.com>, Chris Rogers <crogers@google.com>, Web Applications Working Group WG <public-webapps@w3.org>, Eric Uhrhane <ericu@google.com>, michaeln@google.com, Alexey Proskuryakov <ap@webkit.org>, Geoffrey Garen <ggaren@apple.com>, jorlow@google.com
Message-id: <CA5BF7D8-9EFE-462F-9A06-33F86B7BD881@apple.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>

On Oct 27, 2010, at 12:04 AM, Boris Zbarsky wrote:

> On 10/27/10 2:28 AM, Darin Fisher wrote:
>> I think it's about performance as well as implementor convenience.  If
>> the implementor knows up front that the data should be stored as a Blob,
>> then the implementor can write the data to disk without having to waste
>> memory.
> 
> I have no problem with hinting to the implementor that the result is expected to be used as a Blob so they can optimistically store it to disk.  My problem is with then making it impossible to get it as a string if needed later (which would just involve reading the data from disk into memory).

But I think we need more than a hint. Caching to disk would save system memory, but it's still extra work. And often (i would argue almost always) the author knows up front how the data will be used and will only need the data in one format. 

I think we need a way to let the author say "I need this data in this format and if I ever try to access it differently you can throw an error".

-----
~Chris
cmarrin@apple.com
Received on Wednesday, 27 October 2010 17:14:28 GMT

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