W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: Using ArrayBuffer as payload for binary data to/from Web Workers

From: Glenn Maynard <glenn@zewt.org>
Date: Wed, 9 Mar 2011 16:35:57 -0500
Message-ID: <AANLkTikhJ3nizgn2UVfxDyLyQp397Y1ELb+yQrm5r4oV@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Chris Marrin <cmarrin@apple.com>, Web Applications Working Group WG <public-webapps@w3.org>
On Wed, Mar 9, 2011 at 3:40 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 3/9/11 1:54 PM, Glenn Maynard wrote:
>>
>> Any system with memory protection can interrupt on write, which makes
>> copy-on-write very close to free, as long as you can page-align the
>> buffer.
>
> That's a pretty serious caveat, though.  And you're assuming that memory
> meta-operations like "set up a custom write interrupt handler for this page"
> are free, which is not exactly the case as I understand it.

I don't think the presence of an MMU is a serious caveat for an
optional optimization (even an important one), and you only need to
set it up when it turns into a COW buffer, not before each access.

Either way I agree with a direct zero-copy based API rather than
building on COW.  No sense introducing this complexity to
implementations if it won't actually make the API better.

-- 
Glenn Maynard
Received on Wednesday, 9 March 2011 21:36:30 GMT

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