[jdom-interest] JDOM Performance

Laurent Bihanic laurent.bihanic at atosorigin.com
Thu Jun 5 23:53:31 PDT 2003


Hi,

Dennis Sosnoski wrote:
> Yup, that's out of date. The results actually haven't changed by a lot 
> since then, though I think JDOM has improved on speed. I ran a recent 
> set of tests using updated code, but found out afterward that I need to 
> enable an option so JDOM will reuse the same parser rather than 
> constructing a new one for each document. I'll try again soon with this 
> option enabled. It looks like JDOM is now close to dom4j on speed, 
> though still about 20-25% bulkier in memory usage for my tests.

Running Sosnoski's benchmark on my customized b9-based JDOM show that it still
uses a little bit more memory than DOM4J (4%) and that the SAX build is still
10-15% slower, even with parser reuse enabled.
For document modification and walking, JDOM exhibits excellent min. times,
sometimes better than DOM4J, but poor average times. I suspect JDOM allocates
too many temporary objects triggering many GC runs.

I haven't yet tried with the latest from CVS.

Dennis, if you're updating your benchmark, it would be nice if you could
change it so that it stores only one document at the time in memory. That
would allow performing many passes to get significant average values while the
current version fails on OutOfMemoryErrors as all the documents for all the
passes are kept in memory.

Laurent




More information about the jdom-interest mailing list