W3C home > Mailing lists > Public > www-dom@w3.org > July to September 1998

Re: Anybody for a server-DOM spec -> transferring nodes and listener model.

From: Don Park <donpark@quake.net>
Date: Wed, 19 Aug 1998 11:44:21 -0700
Message-ID: <002c01bdcba1$6575e400$2ee044c6@arcot-main>
To: <www-dom@w3.org>
>> ...enumeration of 24000 elements took 200 milliseconds using
>> item() and 220 milliseconds using getNextSibling().
>
>I think my implementation probably runs both pretty quickly... EXCEPT when
>"liveness" becomes an issue, at which point losing the cached info blows
>one out of the water.


My numbers are for 'live' children list.  All you have to do is cache the
index of the last accessed position in the NodeList implementation.  For
getNextSibling(), just search forward from the cached index.  For
getPreviousSibling(), search backward.  If any element is removed before the
cached index position, decrement the cached index.

If you can't make sense out of my description, just wait for Docuverse DOM
SDK to be released (soon) and check out the source code.

Don
Received on Wednesday, 19 August 1998 14:53:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:45 GMT