Re: DOM Level 1 Becomes a W3C Recommendation

At 09:05 AM 10/2/98 +0200, Arnaud Le Hors wrote:
>Claude Zervas wrote:
>> 
>> Node.appendChild() is probably one of the most common method calls when
>> building
>> server-side documents (or parsing existing documents) and to purposely
inhibit
>> efficient implementation is extremely short-sighted (I'm being polite).
>
>But remember that the cost of walking up the hierarchy to test whether
>the inserted node is an ancestor only applies when the node is already
>in the tree. In the case where the node is not in the tree, that is when
>it has no parent, the test will be very cheap. And I expect this to be
>the most common case.

Yes, for parsing and new document generation you're right.
But for filtering applications where nodes are moved or
child trees are flattened then the cost could be high.

- Claude Zervas
Adobe Systems, Inc.

Received on Friday, 2 October 1998 14:54:49 UTC