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

Re: [XHR] chunked

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 30 Nov 2011 15:44:31 -0800
Message-ID: <CA+c2ei9Owm+ArVxwiYP=MM8tJe0PLhPS3iQUiugKu1pt+81EvQ@mail.gmail.com>
To: Charles Pritchard <chuck@jumis.com>
Cc: Anne van Kesteren <annevk@opera.com>, WebApps WG <public-webapps@w3.org>
On Wed, Nov 30, 2011 at 1:03 PM, Charles Pritchard <chuck@jumis.com> wrote:
> On Nov 30, 2011, at 12:41 PM, Jonas Sicking <jonas@sicking.cc> wrote:
>> On Wed, Nov 30, 2011 at 12:13 PM, Charles Pritchard <chuck@jumis.com> wrote:
>>> On Nov 30, 2011, at 11:32 AM, Jonas Sicking <jonas@sicking.cc> wrote:
>>>>> Charles asked whether "chunked-text" was really needed (and whether we
>>>>> should have "chunked" which implies ArrayBuffer instead). Nobody got back to
>>>>> him on that.
>>>> Any text based format would benefit from chunked-text. While the
>>>> example above uses a binary format, it applies equally to text based
>>>> formats. And given how much we in this group seem to prefer text based
>>>> formats, (HTML, CSS, Javascript, EventSource, JSON) I think we should
>>>> assume that other people at least use them, if not prefer them.
>>> My thinking was that ArrayBuffer can easily be converted to String by authors. Even with text-based formats, I prefer to fetch data as blob and buffer.
>> Why?
> Because it helps with general methods to pass buffers around, and stream processing is buffer based. I don't need to worry about character sets or errant binary data. It's raw and easy to port, being a Transferable object.

Why couldn't you use strings instead of buffers when dealing with
textual data? And why don't you need need to worry less about
characters sets if you are doing the charset conversion rather than
the UA? I would imagine you'd have to worry more about character sets
if you take on that burden rather than let the UA do it.

I can see the argument of being a Transferable object. But why
transfer the chunked data between threads? Just do the load on the
thread that is going to interpret the data.

> Many of my encoding and decoding methods expect byte arrays.

And these methods are dealing with textual data? Note that no-one is
proposing the ability to do chunked-arraybuffer. The question is if we
should have chunked-text as well.

/ Jonas
Received on Wednesday, 30 November 2011 23:45:25 UTC

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