axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Green <>
Subject Axis performance and MessageElement.equals()
Date Wed, 13 Oct 2004 21:51:58 GMT

I've been doing some performance profiling and I stumbled into
MessageElement.equals().  Is there any reason why the equals method
needs to compare strings?  Can it not just compare the objects?

The reason I ask is because of because of NodeImpl.  NodeImpl keeps an
ArrayList of children.  Many of the operations in NodeImpl use
ArrayList.indexOf() which calls equals().  Isn't it the case that
removeChild(), insertBefore(), etc... should be looking for a specific
object, not an object that looks the same?  While we're at it, shouldn't
removeChild() return after finding the child?  Currently, it continues
to search for more children that equals() the child to remove.  The DOM
documents are not clear on this.

Thank you.


View raw message