[jdom-interest] Thread questions regarding JDOM SAXBuiler?

David Wall d.wall at computer.org
Thu Sep 2 09:07:36 PDT 2004


Very interesting.  At least now "reuse" is shown to have better performance
as we might expect, though it's not clear why it sometimes falls to being a
worse performer. I can see it's advantage become less interesting as the
size of the XML gets bigger because the savings are small compared to the
large processing costs.

By why this comment in the javadocs:

public void setReuseParser(boolean reuseParser)
  Specifies whether this builder shall reuse the same SAX parser when
performing subsequent parses or allocate a new parser for each parse. The
default value of this setting is true (parser reuse). Setting the value to
false can result in a performance improvement when parsing large numbers of
files in sequence.

David


----- Original Message ----- 
From: "Laurent Bihanic" <laurent.bihanic at atosorigin.com>
To: <jdom-interest at jdom.org>
Cc: "Per Norrman" <per.norrman at austers.se>; "David Wall"
<d.wall at computer.org>
Sent: Thursday, September 02, 2004 2:16 AM
Subject: Re: [jdom-interest] Thread questions regarding JDOM SAXBuiler?


>
> Here are some more complete test results. These tests (1000 iterations)
were
> run on a PowerBook G4 1.25GHz with the following JVM:
>    java version "1.4.2_05"
>    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141)
>    Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode)
>
> I ran the tests with the client and server JVMs and the results for the
> warm-up runs have been removed:
>
> 1. Client JVM
> -------------
>
> java -Xmx16m large.ThreadedReader
> Reuse=true      size=1927       time: 8751
> Reuse=false     size=1927       time: 34469
>
> Reuse=true      size=21837      time: 226081
> Reuse=false     size=21837      time: 242565
>
> Reuse=true      size=43469      time: 370258
> Reuse=false     size=43469      time: 347194
>
> java -Xmx48m large.ThreadedReader
> Reuse=true      size=1927       time: 11858
> Reuse=false     size=1927       time: 33869
>
> Reuse=true      size=21837      time: 180072
> Reuse=false     size=21837      time: 216430
>
> Reuse=true      size=43469      time: 368117
> Reuse=false     size=43469      time: 363064
>
> Reuse=true      size=325632     time: 1921942
> Reuse=false     size=325632     time: 1858348
>
> java -Xmx64m large.ThreadedReader
> Reuse=true      size=1927       time: 8325
> Reuse=false     size=1927       time: 34258
>
> Reuse=true      size=21837      time: 197315
> Reuse=false     size=21837      time: 227706
>
> Reuse=true      size=43469      time: 354253
> Reuse=false     size=43469      time: 357230
>
> Reuse=true      size=325632     time: 1784903
> Reuse=false     size=325632     time: 1721553
>
>
> 2. Server JVM
> -------------
>
> java -server -Xmx48m large.ThreadedReader
> Reuse=true      size=1927       time: 5397
> Reuse=false     size=1927       time: 21772
>
> Reuse=true      size=21837      time: 55174
> Reuse=false     size=21837      time: 70201
>
> Reuse=true      size=43469      time: 141527
> Reuse=false     size=43469      time: 149508
>
> Reuse=true      size=325632     time: 1515216
> Reuse=false     size=325632     time: 1885217
>
> java -server -Xmx64m large.ThreadedReader
> Reuse=true      size=1927       time: 5741
> Reuse=false     size=1927       time: 21157
>
> Reuse=true      size=21837      time: 58918
> Reuse=false     size=21837      time: 70616
>
> Reuse=true      size=43469      time: 160325
> Reuse=false     size=43469      time: 177267
>
> Reuse=true      size=325632     time: 1578141
> Reuse=false     size=325632     time: 1610306
>
> java -XX:+AggressiveHeap large.ThreadedReader
> Reuse=true      size=1927       time: 6285
> Reuse=false     size=1927       time: 21567
>
> Reuse=true      size=21837      time: 54959
> Reuse=false     size=21837      time: 74266
>
> Reuse=true      size=43469      time: 94196
> Reuse=false     size=43469      time: 113176
>
> Reuse=true      size=325632     time: 725134
> Reuse=false     size=325632     time: 744002
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list