- From: Michael Amster <mamster@webeasy.com>
- Date: Wed, 06 May 1998 11:35:55 -0700
- To: www-dom@w3.org
Hi: I've been following the discussion on NodeIterators for its entirety and would like to make some comments. First, without Node locking semantics in DOM, the idea of maintaining a synchronized tree to readers and writers looks very difficult to me. That the NodeIterator should be robust enough to take an insertion or deletion of children is given, but the results in a greater sense are not clear to me. I'd also like to examine the cost of some of these operations (in Java) as Don Parks mentioned. Java has a high cost of object instantiation, so object reuse is paramount to a good implementation (again, I am working on the Server side so we are talking about large numbers of DOM nodes and users). The use of NodeIterator for both Attributes and child nodes is expensive in Java where an iterator will be instantiated for examining the Attributes and for examining the Child nodes. My feeling is that we should make the common things fast. If DOM trees are built, my assumption is that readers/users will outnumber writers/producers so that the reference operations need to be faster than the building operations. In AttributeList where order is not important (at least not in XML), it seems like a waste to use the NodeIterator, when indexed access or associative access is all that's needed. Adding or deleting attributes should be up to the implementor to implement efficiently - the NodeIterator restriction limits the options for a developer. What is the issue for using NodeIterator for AttributeList? Is it because it is already defined conveniently? Is it so that Entity References can be represented (thereby using Node rather than a simpler object for Attribute)? -MA ~-~-~-~-~-~-~-~-~-~-~-~-~-~-WEBEASY-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ Michael Amster mamster@webeasy.com 4676 Admiralty Way, Suite 300 Tel: 310.576.0770 Marina Del Rey, CA 90292 Fax: 310.576.2011 ~-~-~-~-~-~-~-~-~-~-~-~-~-~-WEBEASY-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ Michael Amster mamster@webeasy.com 4676 Admiralty Way, Suite 300 Tel: 310.576.0770 Marina Del Rey, CA 90292 Fax: 310.576.2011
Received on Wednesday, 6 May 1998 14:37:17 UTC