Element.getElementsByTagName Efficiency 2003-01-22 - By Hanson, Matthew
Hi - I am wondering, without being offensive, what is the underlying architecture of the Element class and its impact on getElementsByTagName. I am currently using a binary search tree (i.e., homegrown implementation of Set) to contain data and have fast access time to contains() and extends this to add a findReference() method to return a member of the tree.
It would be nice to swap this with xerces and use getElementsByTagName() as a find method, but I worry that the access time may slow down. Without looking at the code too much, I may have seen the underlying structure for storing children as an array. Please confirm, and please understand, I know that xml is not meant to support comparison of siblings or non-reference equality found with Object.equal() and Comparable interface.
I am just wondering if the benefits of dom are applicable when I'm searching for specific children from within potentially hundreds (or several thousand) of child elements.
Thank - Matt Hanson
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|