W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

Re: Should send() be able to take an ArrayBufferView?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 11 Apr 2012 21:15:37 -0400
Message-ID: <4F862CB9.9040507@mit.edu>
To: Charles Pritchard <chuck@jumis.com>
CC: Kenneth Russell <kbr@google.com>, public-webapps <public-webapps@w3.org>
On 4/11/12 5:54 PM, Charles Pritchard wrote:
>> Note that those have different performance characteristics, too; the
>> latter involves a buffer copy.
> Are we stuck with a buffer copy (or copy on write) mechanism anyway?

Yes-ish; the question is how many copies there are.

> What is the spec on changing the buffer after xhr.send?

says that the request body is the data in the array buffer when send() 
is called.

Whether that involves a copy depend on whether you get the data down to 
the socket before send() returns, obviously.  In most cases, I would 
assume it would.

Having so slice() means you have to copy twice instead of once.

Received on Thursday, 12 April 2012 01:16:07 UTC

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