[jdom-interest] List's in JDOM - a small essay
    Ken Rune Helland 
    kenh at csc.no
       
    Fri Mar  9 08:31:26 PST 2001
    
    
  
At 05:13 PM 3/9/2001 +0100, Laurent Bihanic wrote:
>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
I agree, if you commondly (almost always) insert at
the back of the list you must have a lastItem reference.
KenR
    
    
More information about the jdom-interest
mailing list