- From: Don Park <donpark@quake.net>
- Date: Wed, 19 Aug 1998 11:44:21 -0700
- 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 UTC