On Thu, Jun 2, 2011 at 5:30 PM, Glenn Maynard <gl...@zewt.org> wrote: > On Thu, Jun 2, 2011 at 5:01 PM, David Levin <le...@chromium.org> wrote: >> It feels like this array of objects given to transfer may complicate (and >> slow down) both the implementation of this as well as the developer's use of >> it. > > Even with thousands of objects, creating an array containing them is > quick (and only needs to be done once), and the implementation would > presumably convert it to a set internally for quick lookups. I doubt > most use cases will transfer so many separate objects, though. > > (And Ian keeps drilling into our head that implementation complexity > isn't a major concern, though I don't imagine converting a list of > objects to a hash table is complex.)
It's spec complexity he was talking about--but anyway, making a hash table or tree from a list doesn't seem complicated; maybe there are other issues. I suppose this could also be done with a per-object flag, eg. arrayBuffer.setCloneTransfer(true), but as it's the postMessage call being modified I'm not sure flagging it on the object itself is clearer. -- Glenn Maynard