W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2011

Re: modifying the DOM WAS: Node append

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 06 Oct 2011 09:43:52 -0400
Message-ID: <4E8DB098.9000008@mit.edu>
To: Sean Hogan <shogun70@westnet.com.au>
CC: Ojan Vafai <ojan@chromium.org>, Anne van Kesteren <annevk@opera.com>, Aryeh Gregor <ayg@aryeh.name>, Erik Arvidsson <arv@chromium.org>, Olli@pettay.fi, Robin Berjon <robin@berjon.com>, www-dom@w3.org, Alex Russell <slightlyoff@chromium.org>
On 10/6/11 8:39 AM, Sean Hogan wrote:
>> The point being that the performance tradeoff is actually not obvious
>> here.
> Thanks. My reading of that is that for an array of nodes the performance
> can't possibly be better than calling (say) appendChild() separately for
> each node, due to all the JS <-> C++ transitions. Is that correct?

No.  A correct statement is that the performance may be better or worse 
or about the same, depending on the performance of the DOM bindings 
involved, the level of coupling between the DOM implementation and the 
JS engine (e.g. can the DOM implementation get its hands directly on the 
underlying storage of a JS array?), the speed of the native-code APIs 
for extracting elements from an array, etc, etc.

Received on Thursday, 6 October 2011 13:44:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:36:59 UTC