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

Re: NodeList interface

From: <keshlam@us.ibm.com>
Date: Fri, 25 Sep 1998 17:16:10 -0400
To: www-dom@w3.org
Message-ID: <8525668A.0073C7DA.00@us.ibm.com>
The standard kluge-around for almost tolerable efficiency seems to be to
have NodeList cache everything it finds, refresh that cache if the tree
structure has changed below the point getElementsByTagName was started
from, and have the length() operation immediately fill the whole cache
(since it has to walk the subtree anyway to answer this question). Then it
becomes a question of how much work you're willing to do in the cache --
whether you throw it all away and start over, or try to refresh only the
changed subtrees.

Very to extremely ugly internally, in exchange for a simplified API. Some
would say excessively simplified. Definitely a religious issue.

I know how you feel; I too learned about the DOM only after this war had
ended and I don't like the outcome... but we're stuck with it in Level 1.
Level 2, hopefully, will have better-architected alternatives and we can
try to discourage people from using getElementsByTagName at that time.

Joe Kesselman  / IBM Research
Unless stated otherwise, all opinions are solely those of the author.
Received on Friday, 25 September 1998 14:35:50 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:04 UTC