[jdom-interest] List's in JDOM - a small essay

Laurent Bihanic laurent.bihanic at atosorigin.com
Fri Mar 9 08:13:30 PST 2001


Hi,

The following point might be a bit of a problem in the context of JDOM as the 
SAX builder appends chidren at the end of the list when building a document.


> I can here you say "What about a sparse index?" or "Why not just keep a 
> reference to the last element?". Because this list needs to be totally
> lightweight. Just go through your code add see how many times you call
> getChildren().iterator() then you'll see what I mean

If the list does not cache the last element, the parsing time may become 
exponential.

Laurent




More information about the jdom-interest mailing list