[jdom-interest] Huge slowdown when reading > 15 xml files 
    philip.nelson at omniresources.com 
    philip.nelson at omniresources.com
       
    Tue Oct 23 16:51:45 PDT 2001
    
    
  
> The problem is Element.addContent( String) concatenates 
> adjacent String
> elements. On c_large_123k_1.xml that came out to 24770 String appends.
> Commenting out all code in org.jdom.Element.addContent(String)
> except the last line "content.add( data)" yielded a dramatic 
> speed up on
> par with the a_small_*.xml test cases, but at the cost of
> content.size() > 24,000.
I am embarrased to say that I didn't even look at addContent(String), just
identified it as the problem. At least I thought of the right solution of
appending where appropriate.  Now we just need to make this work better. I
think the optimizations we have been talking about make sense but it still
needs to be proven.
> 
> For specialized cases like this, I like using the power of 
> extension and
> would extend DefaultJDOMFactory and Element (redefining addContent) to
> fit my needs.
To bad you can't just extend String ;-)
    
    
More information about the jdom-interest
mailing list