[jdom-interest] Thread questions regarding JDOM SAXBuiler?

Laurent Bihanic laurent.bihanic at atosorigin.com
Wed Sep 1 09:29:52 PDT 2004


David Wall wrote:
> That's really interesting, though it also appears you've set some GC
> arguments as well (I'm not familiar with them).  But the GC did sound like

Just running the HotSpot JVM in a server configuration.

> it might be a problem, though in the end, they both should have created the
> same large XML document objects that would then be discarded.  But this
> continues to show 'reuse==true' creates a performance hit.  Why have an

No, the result I sent show that there is indeed a performance improvement. The 
smaller the files, the bigger the improvement.

> option that appears to slow things down, and even the javadocs indicate it
> would slow things down.  What's the purported benefit of doing reuse==true?

reuse = true is a huge performance improvement especially when dealing with 
small documents and schema validation.
On a server-side application processing 1-5KB documents validated against 40KB 
schemas, reusing Xerces instances enabled us to jump from 200 req/s to 330 req/s.

Laurent

> ----- Original Message ----- 
> From: "Laurent Bihanic" <laurent.bihanic at atosorigin.com>
> To: "Per Norrman" <per.norrman at austers.se>
> Cc: "David Wall" <d.wall at computer.org>; <jdom-interest at jdom.org>
> Sent: Wednesday, September 01, 2004 7:54 AM
> Subject: Re: [jdom-interest] Thread questions regarding JDOM SAXBuiler?
> 
>>I don't think your test tool performs enough iterations for the result to be
>>reliable due to garbage collector side-effects.
>>I modified your tool to run 1000 iterations instead of 20 :
>>
>>java -XX:+AggressiveHeap large.ThreadedReader
>>
>>Reuse=true      size=21837      time: 42497
>>Reuse=false     size=21837      time: 40796
>>
>>Reuse=true      size=1927       time: 3403
>>Reuse=false     size=1927       time: 11125
>>
>>Reuse=true      size=21837      time: 28469
>>Reuse=false     size=21837      time: 35527
>>
>>Reuse=true      size=43469      time: 57238
>>Reuse=false     size=43469      time: 63963
>>
>>Reuse=true      size=325632     time: 428557
>>Reuse=false     size=325632     time: 443638
>>
>>...


More information about the jdom-interest mailing list