After looking into the code I don't understand the profiler results at all. The org.apache.axiom.om.impl.traverse.*OMChildrenIterator*.*next*() is where 32% of the total time is spent, if I'm reading this correctly, but this consists of almost nothing except a call to org.apache.axiom.om.OMNode.getNextOMSibling() - and the latter method doesn't even show in the results, even though the parser methods called by the implementation of getNextOMSibling() *are* shown. Was there something weird about the settings you used to generate the profile, dims?

 - Dennis

Dennis Sosnoski wrote:

I'm not much for profilers - they're okay for minor performance tuning, but I see performance as a matter of design rather than tuning.

Looking at these results, I suspect that as Eran suggested XMLStreamWriter is not very performant compared to writing straight to an output stream/writer. That might have a lot to do with why Axiom output is so slow compared to dom4j and most of the document models - those approachs all write directly to the output stream or writer. Adding support for Axiom to write directly to a stream/writer could help a lot on this part.

On the input side, it looks like a lot of time is going into constructing the tree within OMChildIterator. The parse time is a small fraction of the total time here. Part of the Axiom overhead in building the tree is probably due to the size of the data objects, which are more than twice as large as dom4j. That aside, the code may just be inefficient - I'll take a look and see if I spot anything obvious.

 - Dennis

Davanum Srinivas wrote:

Dennis, Glen,

Need help interpreting this output from my profiler (running using JDK1.5):
http://people.apache.org/~dims/omperf/

This corresponds to the following command line:
java %JAVA_OPTS% -Xms512M -Xmx512M -cp
bin;lib/axiom-api-SNAPSHOT.jar;lib/axiom-impl-SNAPSHOT.jar;lib/stax-api-1.0.jar;lib/wstx-asl-2.8.2.jar
com.sosnoski.xmlbench.XMLBench -sb axiom docs/init.xml
docs/xmlformatter.xml docs/soaps

Where do you think the problem is?

thanks,
dims

On 3/30/06, Dennis Sosnoski <[EMAIL PROTECTED]> wrote:
And by the way, it'd be interesting to see if those JRockit figures stay as good if you cut way back on the memory (say to 16MB, or even less for
the small document test). If JRockit *is* just taking advantage of the
large available memory, those performance benefits are not going to
apply to server applications (where no matter how big the pool, you end
up running out at some point and have to start recycling).

 - Dennis

Dennis Sosnoski wrote:

Nice figures from JRockit! It's interesting that basically all the
times are improved with JRockit, but the amount of improvement depends
on the library. dom4j still beats OM by a comfortable margin even
under JRockit, though (reformatted):

Running dom4j with 10 passes on file docs/xmlformatter.xml (274920
bytes):
Build-Walk mn=18870 Build-Walk av=19241 Write mn=13767 Write av=14002

Running dom4j with 10 passes on directory docs/soaps (30 files
totaling 19407 bytes):
Build-Walk mn=1957  Build-Walk av=2110 Write mn=2049 Write av=2225

Running Axiom with 10 passes on file docs/xmlformatter.xml (274920
bytes):
Build-Walk mn=24581 Build-Walk av=25434 Write mn=25519 Write av=26312

Running Axiom with 10 passes on directory docs/soaps (30 files
totaling 19407 bytes):
Build-Walk mn=7492  Build-Walk av=8534 Write mn=8156 Write av=8653

I don't know why JRockit does so much better for some of the
libraries. More efficient memory allocations and garbage collection,
perhaps? I think dom4j has been more performance-designed than the
other libraries, so I'm not surprised that it gains relatively little
from JRockit on the large document run (build+walk is actually a
little slower, but the JRockit write time is better). But even dom4j
gains a lot on the small document test runs.

JRockit is definitely not cooperating on the attempts at garbage
collection (I do repeated calls to System.gc() with waits in between,
which generally works on Sun and IBM JVMs) - that's why the memory
size figures are all garbage. I suspect what's going on is that the
large memory size I used for the tests (512 MB initial and maximum
memory) causes JRockit to mostly skip garbage collection and just use
the large pool available, while Sun's JVM still does the cleanup. The
libraries that generate the most garbage would gain the most from
JRockit in this case, which seems to match the results. The small
differences between the minimum times and average times for JRockit
would also go along with this.

Incidentally, the version of the code I provided is Java 5+ only,
since it uses System.nanoTime(). It's easy to tweak this to use
System.currentTimeMillis() instead for older JVMs, but the precision
of the timing values is naturally not as good that way.

- Dennis

Davanum Srinivas wrote:

Dennis,

what do you make of these test runs? as the name implies one is under
JDK15 the other one using JRockit.

thanks,
dims

On 3/30/06, Dennis Sosnoski <[EMAIL PROTECTED]> wrote:


You might want to just add this on to the one I created, Glen:
http://issues.apache.org/jira/browse/AXIS2-533 I include JDOM in my
test
code there (using the Piccolo SAX parser), but didn't discuss the JDOM
results in the text since dom4j is generally faster and smaller.

- Dennis

Davanum Srinivas wrote:



Glen,

Could up please send the bigfile.xml as well? Better to do it via
JIRA.

thanks,
dims

On 3/30/06, Glen Daniels <[EMAIL PROTECTED]> wrote:




Hi folks:

The following is a quick test which takes an XML input file,
parses it,
and walks the tree collecting all text content.  It does this
using both
JDOM (note that you'll need the StAXBuilder and StAXTextModifier
which
you can find at http://svn.woodstox.codehaus.org/utils/jdom/) and
AXIOM,
100 times each, and then averages the timings.  The code is as
close to
identical as I could get for the two packages.

For the file I'm working with (about 150K) I'm seeing AXIOM get an
average time around 180ms, whereas JDOM comes in at around 77ms. The strings match up. This could be better, because frankly JDOM is way
easier to use. :)

I think it might be time to integrate some performance testing
into our
builds, and to do some optimization on AXIOM.  I haven't yet
looked at
comparing memory footprints, but may try to do that sometime soon.

--Glen

--------

import org.apache.axiom.om.OMXMLParserWrapper;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMNode;
import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory;
import org.jdom.input.StAXBuilder;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.Content;

import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLInputFactory;
import java.io.FileInputStream;
import java.util.Iterator;
import java.util.List;
import java.util.Date;

public class Test {
  static class Timer {
      long startTime;
      long stopTime;

      public void start() {
          startTime = new Date().getTime();
      }

      public long stop() {
          stopTime = new Date().getTime();
          return (stopTime - startTime);
      }
  }

  // A place to save the string length for comparison purposes
  static int strLen = 0;

  public static void main(String[] args) throws Exception {
      // Replace with any big file
      String FILENAME = "Scratch/bigfile.xml";

      int NUM_RUNS = 100;
      long accum = 0;

      for (int i = 0; i < NUM_RUNS; i++) {
          FileInputStream fis = new FileInputStream(FILENAME);
          XMLStreamReader parser =
XMLInputFactory.newInstance().createXMLStreamReader(fis);
          accum += runAXIOMTest(parser);
          parser.close();
          fis.close();
      }
      System.out.println("OM avg was " + (accum / NUM_RUNS) +
              " (" + strLen + ")");

      strLen = 0;
      accum = 0;

      for (int i = 0; i < NUM_RUNS; i++) {
          FileInputStream fis = new FileInputStream(FILENAME);
          XMLStreamReader parser =
XMLInputFactory.newInstance().createXMLStreamReader(fis);
          accum += runJDOMTest(parser);
          parser.close();
          fis.close();
      }
      System.out.println("JDOM avg was " + (accum / NUM_RUNS) +
              " (" + strLen + ")");
  }

  public static long runAXIOMTest(XMLStreamReader parser) throws
Exception {
      Timer t = new Timer();
      t.start();
      OMXMLParserWrapper builder =
OMXMLBuilderFactory.createStAXOMBuilder(OMAbstractFactory.getOMFactory(),

parser);
      OMElement root = builder.getDocumentElement();
      StringBuffer buf = new StringBuffer();
      genAXIOMString(root, buf);
      long elapsed = t.stop();
      if (strLen == 0) {
//            System.out.println("[" + buf.toString() + "]");
          strLen = buf.length();
      }
      return elapsed;
  }

  public static long runJDOMTest(XMLStreamReader parser) throws
Exception {
      Timer t = new Timer();
      t.start();
      StAXBuilder builder = new StAXBuilder();
      Document doc = builder.build(parser);
      StringBuffer buf = new StringBuffer();
      Element root = doc.getRootElement();
      genJDOMString(root, buf);
      long elapsed = t.stop();
      if (strLen == 0) {
//            System.out.println("[" + buf.toString() + "]");
          strLen = buf.length();
      }
      return elapsed;
  }

  // These two methods do the exact same thing, one for AXIOM and
one
  // for JDOM.  Walk the tree and collect all the text.

  public static void genAXIOMString(OMElement el, StringBuffer
buf) {
      buf.append(el.getText());
      Iterator i = el.getChildren();
      while (i.hasNext()) {
          OMNode node = (OMNode)i.next();
          if (node instanceof OMElement) {
              OMElement element = (OMElement) node;
              genAXIOMString(element, buf);
          }
      }
  }

  public static void genJDOMString(Element el, StringBuffer buf) {
      buf.append(el.getText());
      List children = el.getChildren();
      for (Iterator i = children.iterator(); i.hasNext();) {
          Content content = (Content)i.next();
          if (content instanceof Element) {
              Element element = (Element)content;
              genJDOMString(element, buf);
          }
      }
  }
}





--
Davanum Srinivas : http://wso2.com/blogs/





--
Davanum Srinivas : http://wso2.com/blogs/


------------------------------------------------------------------------

C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/jaxp.jar;lib/Piccolo.jar;lib/jdom.jar
com.sosnoski.xmlbench.XMLBench -sb -u com.bluecast.xml.Piccolo jdom
docs/init.xml docs/xmlformatter.xml docs/soaps
Running JDOM with 10 passes on file docs/init.xml (3604 bytes):
Document has 51 elements, 82 attributes with 1215 characters of
data, and 65 content text segments with 380 characters of text
Original text size was 3604, output text size was 3441
Build mn=1868   Build av=7267   Walk mn=23      Walk av=141
Build-Walk mn=1891
Build-Walk av=7408 Write mn=720 Write av=2053   Mod mn=125      Mod
av=322
Elems=51        Conts=65        Attrs=82        Text ch=380     Attr
ch=1215

Running JDOM with 10 passes on file docs/xmlformatter.xml (274920
bytes):
Document has 5009 elements, 1 attributes with 1 characters of data,
and 10017 content text segments with 92468 characters of text
Original text size was 274920, output text size was 274962
Build mn=33318  Build av=43830  Walk mn=703     Walk av=1492
Build-Walk mn=34021
Build-Walk av=45322 Write mn=15636 Write av=25741 Mod mn=6765   Mod
av=7114
Elems=5009      Conts=10017     Attrs=1         Text ch=92468   Attr
ch=1

Running JDOM with 10 passes on directory docs/soaps (30 files
totaling 19407 bytes):
Document has 211 elements, 162 attributes with 2431 characters of
data, and 72 content text segments with 452 characters of text
Original text size was 19407, output text size was 19521
Build mn=3975   Build av=6611   Walk mn=72      Walk av=104
Build-Walk mn=4047
Build-Walk av=6715 Write mn=2813 Write av=16344 Mod mn=115      Mod
av=120
Elems=211       Conts=72        Attrs=162       Text ch=452     Attr
ch=2431


C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/jaxp.jar;lib/Piccolo.jar;lib/dom4j.jar
com.sosnoski.xmlbench.XMLBench -sb -u com.bluecast.xml.Piccolo dom4j
docs/init.xml docs/xmlformatter.xml docs/soaps
Running dom4j with 10 passes on file docs/init.xml (3604 bytes):
Document has 51 elements, 82 attributes with 1215 characters of
data, and 65 content text segments with 380 characters of text
Original text size was 3604, output text size was 3329
Build mn=2390   Build av=6768   Walk mn=75      Walk av=262
Build-Walk mn=2465
Build-Walk av=7030 Write mn=656 Write av=2103 Mod mn=2 Mod av=2
Elems=51        Conts=65        Attrs=82        Text ch=380     Attr
ch=1215

Running dom4j with 10 passes on file docs/xmlformatter.xml (274920
bytes):
Document has 5009 elements, 1 attributes with 1 characters of data,
and 10020 content text segments with 92468 characters of text
Original text size was 274920, output text size was 268945
Build mn=16091  Build av=17048  Walk mn=2146    Walk av=2225
Build-Walk mn=18237
Build-Walk av=19273 Write mn=14927 Write av=15583 Mod mn=2 Mod av=2
Elems=5009      Conts=10020     Attrs=1         Text ch=92468   Attr
ch=1

Running dom4j with 10 passes on directory docs/soaps (30 files
totaling 19407 bytes):
Document has 211 elements, 162 attributes with 2431 characters of
data, and 72 content text segments with 452 characters of text
Original text size was 19407, output text size was 19450
Build mn=4975   Build av=7369   Walk mn=83      Walk av=94
Build-Walk mn=5058
Build-Walk av=7463 Write mn=2688 Write av=3134 Mod mn=3 Mod av=3
Elems=211       Conts=72        Attrs=162       Text ch=452     Attr
ch=2431


C:\perf2>#java -Xms512M -Xmx512M -cp
bin;lib/dom4j.jar;lib/stax-api-1.0.jar;lib/wstx-asl-2.8.2.jar
com.sosnoski.xmlbench.XMLBench -sb dom4jstax docs/init.xml
docs/xmlformatter.xml docs/soaps
'#java' is not recognized as an internal or external command,
operable program or batch file.

C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/xmlParserAPIs.jar;lib/xercesImpl.jar
com.sosnoski.xmlbench.XMLBench -sb xerces2 docs/init.xml
docs/xmlformatter.xml docs/soaps
Running Xerces2 DOM with 10 passes on file docs/init.xml (3604 bytes):
Document has 51 elements, 84 attributes with 1269 characters of
data, and 65 content text segments with 380 characters of text
Original text size was 3604, output text size was 3263
Build mn=3205   Build av=4825   Walk mn=59      Walk av=324
Build-Walk mn=3264
Build-Walk av=5149 Write mn=353 Write av=2660   Mod mn=272      Mod
av=690
Elems=51        Conts=65        Attrs=84        Text ch=380     Attr
ch=1269

Running Xerces2 DOM with 10 passes on file docs/xmlformatter.xml
(274920 bytes):
Document has 5009 elements, 1006 attributes with 104150 characters
of data, and 10017 content text segments with 92468 characters of text
Original text size was 274920, output text size was 268945
Build mn=17272  Build av=17925  Walk mn=1463    Walk av=1528
Build-Walk mn=18735
Build-Walk av=19453 Write mn=13993 Write av=14586 Mod mn=10135  Mod
av=23954
Elems=5009      Conts=10017     Attrs=1006      Text ch=92468   Attr
ch=104150

Running Xerces2 DOM with 10 passes on directory docs/soaps (30 files
totaling 19407 bytes):
Document has 211 elements, 314 attributes with 7660 characters of
data, and 72 content text segments with 452 characters of text
Original text size was 19407, output text size was 19416
Build mn=3696   Build av=5494   Walk mn=82      Walk av=100
Build-Walk mn=3778
Build-Walk av=5594 Write mn=2008 Write av=4665  Mod mn=158      Mod
av=168
Elems=211       Conts=72        Attrs=314       Text ch=452     Attr
ch=7660


C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/axiom-api-SNAPSHOT.jar;lib/axiom-impl-SNAPSHOT.jar;lib/stax-api-1.0.jar;lib/wstx-asl-2.8.2.jar
com.sosnoski.xmlbench.XMLBench -sb axiom docs/init.xml
docs/xmlformatter.xml docs/soaps
Running Axiom with 10 passes on file docs/init.xml (3604 bytes):
Document has 51 elements, 82 attributes with 1215 characters of
data, and 65 content text segments with 380 characters of text
Original text size was 3604, output text size was 3737
Build mn=440    Build av=3411   Walk mn=2385    Walk av=4784
Build-Walk mn=2825
Build-Walk av=8195 Write mn=1255 Write av=2874 Mod mn=2 Mod av=2
Elems=51        Conts=65        Attrs=82        Text ch=380     Attr
ch=1215

Running Axiom with 10 passes on file docs/xmlformatter.xml (274920
bytes):
Document has 5009 elements, 1 attributes with 1 characters of data,
and 10017 content text segments with 92468 characters of text
Original text size was 274920, output text size was 269121
Build mn=378    Build av=507    Walk mn=28728   Walk av=53739
Build-Walk mn=29106
Build-Walk av=54246 Write mn=21561 Write av=30035 Mod mn=2 Mod av=2
Elems=5009      Conts=10017     Attrs=1         Text ch=92468   Attr
ch=1

Running Axiom with 10 passes on directory docs/soaps (30 files
totaling 19407 bytes):
Document has 211 elements, 162 attributes with 2431 characters of
data, and 72 content text segments with 452 characters of text
Original text size was 19407, output text size was 20490
Build mn=10693  Build av=13045  Walk mn=1790    Walk av=2402
Build-Walk mn=12483
Build-Walk av=15447 Write mn=11645 Write av=15071 Mod mn=3 Mod av=3
Elems=211       Conts=72        Attrs=162       Text ch=452     Attr
ch=2431


C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/jaxp.jar;lib/Piccolo.jar;lib/jdom.jar
com.sosnoski.xmlbench.XMLBench -sbmp4n -u com.bluecast.xml.Piccolo
jdom docs/init.xml docs/xmlformatter.xml docs/soaps
Running JDOM memory test with 4 passes on file docs/init.xml (3604
bytes):
Init mem=430528 Chg mem=417824  First sz=501664 Avg sz=18800
Walked sz=0
Avg+Walked sz=18800

Running JDOM memory test with 4 passes on file docs/xmlformatter.xml
(274920 bytes):
Init mem=848392 Chg mem=1656    First sz=1422536 Avg sz=1356328
Walked sz=0
Avg+Walked sz=1356328

Running JDOM memory test with 4 passes on directory docs/soaps (30
files totaling 19407 bytes):
Init mem=853352 Chg mem=2560    First sz=125624 Avg sz=53304
Walked sz=0
Avg+Walked sz=53304


C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/jaxp.jar;lib/Piccolo.jar;lib/dom4j.jar
com.sosnoski.xmlbench.XMLBench -sbmp4n -u com.bluecast.xml.Piccolo
dom4j docs/init.xml docs/xmlformatter.xml docs/soaps
Running dom4j memory test with 4 passes on file docs/init.xml (3604
bytes):
Init mem=430536 Chg mem=427448  First sz=500032 Avg sz=15264
Walked sz=0
Avg+Walked sz=15264

Running dom4j memory test with 4 passes on file docs/xmlformatter.xml
(274920 bytes):
Init mem=858024 Chg mem=3856    First sz=1032496 Avg sz=971976
Walked sz=0
Avg+Walked sz=971976

Running dom4j memory test with 4 passes on directory docs/soaps (30
files totaling 19407 bytes):
Init mem=865184 Chg mem=7944    First sz=103824 Avg sz=33768
Walked sz=0
Avg+Walked sz=33768


C:\perf2>#java -Xms512M -Xmx512M -cp
bin;lib/dom4j.jar;lib/stax-api-1.0.jar;lib/wstx-asl-2.8.2.jar
com.sosnoski.xmlbench.XMLBench -sbmp4n dom4jstax docs/init.xml
docs/xmlformatter.xml docs/soaps
'#java' is not recognized as an internal or external command,
operable program or batch file.

C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/xmlParserAPIs.jar;lib/xercesImpl.jar
com.sosnoski.xmlbench.XMLBench -sbmp4n xerces2 docs/init.xml
docs/xmlformatter.xml docs/soaps
Running Xerces2 DOM memory test with 4 passes on file docs/init.xml
(3604 bytes):
Init mem=430096 Chg mem=106328  First sz=151064 Avg sz=21824
Walked sz=0
Avg+Walked sz=21824

Running Xerces2 DOM memory test with 4 passes on file
docs/xmlformatter.xml (274920 bytes):
Init mem=536464 Chg mem=0       First sz=1619904 Avg sz=1602008
Walked sz=0
Avg+Walked sz=1602008

Running Xerces2 DOM memory test with 4 passes on directory docs/soaps
(30 files totaling 19407 bytes):
Init mem=539768 Chg mem=0       First sz=105336 Avg sz=78696
Walked sz=0
Avg+Walked sz=78696


C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/axiom-api-SNAPSHOT.jar;lib/axiom-impl-SNAPSHOT.jar;lib/stax-api-1.0.jar;lib/wstx-asl-2.8.2.jar
com.sosnoski.xmlbench.XMLBench -sbmp4n axiom docs/init.xml
docs/xmlformatter.xml docs/soaps
Running Axiom memory test with 4 passes on file docs/init.xml (3604
bytes):
Init mem=457736 Chg mem=51760   First sz=64272  Avg sz=14992
Walked sz=35965
Avg+Walked sz=50957

Running Axiom memory test with 4 passes on file docs/xmlformatter.xml
(274920 bytes):
Init mem=509536 Chg mem=928     First sz=15192  Avg sz=15261
Walked sz=2071960
Avg+Walked sz=2087221

Running Axiom memory test with 4 passes on directory docs/soaps (30
files totaling 19407 bytes):
Init mem=513768 Chg mem=1640    First sz=451960 Avg sz=449760
Walked sz=103520
Avg+Walked sz=553280


C:\perf2>



------------------------------------------------------------------------

C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/jaxp.jar;lib/Piccolo.jar;lib/jdom.jar
com.sosnoski.xmlbench.XMLBench -sb -u com.bluecast.xml.Piccolo jdom
docs/init.xml docs/xmlformatter.xml docs/soaps
Running JDOM with 10 passes on file docs/init.xml (3604 bytes):
Document has 51 elements, 82 attributes with 1215 characters of
data, and 65 content text segments with 380 characters of text
Original text size was 3604, output text size was 3441
Build mn=315    Build av=340    Walk mn=9       Walk av=10
Build-Walk mn=324
Build-Walk av=350 Write mn=286  Write av=329    Mod mn=35       Mod
av=36
Elems=51        Conts=65        Attrs=82        Text ch=380     Attr
ch=1215

Running JDOM with 10 passes on file docs/xmlformatter.xml (274920
bytes):
Document has 5009 elements, 1 attributes with 1 characters of data,
and 10017 content text segments with 92468 characters of text
Original text size was 274920, output text size was 274962
Build mn=36055  Build av=37926  Walk mn=2097    Walk av=2190
Build-Walk mn=38152
Build-Walk av=40116 Write mn=21226 Write av=23061 Mod mn=11950  Mod
av=12656
Elems=5009      Conts=10017     Attrs=1         Text ch=92468   Attr
ch=1

Running JDOM with 10 passes on directory docs/soaps (30 files
totaling 19407 bytes):
Document has 211 elements, 162 attributes with 2431 characters of
data, and 72 content text segments with 452 characters of text
Original text size was 19407, output text size was 19521
Build mn=2727   Build av=3090   Walk mn=57      Walk av=100
Build-Walk mn=2784
Build-Walk av=3190 Write mn=2642 Write av=3037  Mod mn=169      Mod
av=180
Elems=211       Conts=72        Attrs=162       Text ch=452     Attr
ch=2431


C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/jaxp.jar;lib/Piccolo.jar;lib/dom4j.jar
com.sosnoski.xmlbench.XMLBench -sb -u com.bluecast.xml.Piccolo dom4j
docs/init.xml docs/xmlformatter.xml docs/soaps
Running dom4j with 10 passes on file docs/init.xml (3604 bytes):
Document has 51 elements, 82 attributes with 1215 characters of
data, and 65 content text segments with 380 characters of text
Original text size was 3604, output text size was 3329
Build mn=273    Build av=284    Walk mn=15      Walk av=15
Build-Walk mn=288
Build-Walk av=299 Write mn=234 Write av=266 Mod mn=2 Mod av=2
Elems=51        Conts=65        Attrs=82        Text ch=380     Attr
ch=1215

Running dom4j with 10 passes on file docs/xmlformatter.xml (274920
bytes):
Document has 5009 elements, 1 attributes with 1 characters of data,
and 10020 content text segments with 92468 characters of text
Original text size was 274920, output text size was 268945
Build mn=17597  Build av=17924  Walk mn=1273    Walk av=1317
Build-Walk mn=18870
Build-Walk av=19241 Write mn=13767 Write av=14002 Mod mn=2 Mod av=2
Elems=5009      Conts=10020     Attrs=1         Text ch=92468   Attr
ch=1

Running dom4j with 10 passes on directory docs/soaps (30 files
totaling 19407 bytes):
Document has 211 elements, 162 attributes with 2431 characters of
data, and 72 content text segments with 452 characters of text
Original text size was 19407, output text size was 19450
Build mn=1921   Build av=2070   Walk mn=36      Walk av=40
Build-Walk mn=1957
Build-Walk av=2110 Write mn=2049 Write av=2225 Mod mn=2 Mod av=2
Elems=211       Conts=72        Attrs=162       Text ch=452     Attr
ch=2431


C:\perf2>#java -Xms512M -Xmx512M -cp
bin;lib/dom4j.jar;lib/stax-api-1.0.jar;lib/wstx-asl-2.8.2.jar
com.sosnoski.xmlbench.XMLBench -sb dom4jstax docs/init.xml
docs/xmlformatter.xml docs/soaps
'#java' is not recognized as an internal or external command,
operable program or batch file.

C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/xmlParserAPIs.jar;lib/xercesImpl.jar
com.sosnoski.xmlbench.XMLBench -sb xerces2 docs/init.xml
docs/xmlformatter.xml docs/soaps
Running Xerces2 DOM with 10 passes on file docs/init.xml (3604 bytes):
Document has 51 elements, 84 attributes with 1269 characters of
data, and 65 content text segments with 380 characters of text
Original text size was 3604, output text size was 3263
Build mn=323    Build av=357    Walk mn=24      Walk av=24
Build-Walk mn=347
Build-Walk av=381 Write mn=145  Write av=150    Mod mn=29       Mod
av=31
Elems=51        Conts=65        Attrs=84        Text ch=380     Attr
ch=1269

Running Xerces2 DOM with 10 passes on file docs/xmlformatter.xml
(274920 bytes):
Document has 5009 elements, 1006 attributes with 104150 characters
of data, and 10017 content text segments with 92468 characters of text
Original text size was 274920, output text size was 268945
Build mn=18384  Build av=18824  Walk mn=1239    Walk av=1336
Build-Walk mn=19623
Build-Walk av=20160 Write mn=11704 Write av=11998 Mod mn=11572  Mod
av=12464
Elems=5009      Conts=10017     Attrs=1006      Text ch=92468   Attr
ch=104150

Running Xerces2 DOM with 10 passes on directory docs/soaps (30 files
totaling 19407 bytes):
Document has 211 elements, 314 attributes with 7660 characters of
data, and 72 content text segments with 452 characters of text
Original text size was 19407, output text size was 19416
Build mn=2053   Build av=2201   Walk mn=69      Walk av=81
Build-Walk mn=2122
Build-Walk av=2282 Write mn=1306 Write av=1439  Mod mn=155      Mod
av=161
Elems=211       Conts=72        Attrs=314       Text ch=452     Attr
ch=7660


C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/axiom-api-SNAPSHOT.jar;lib/axiom-impl-SNAPSHOT.jar;lib/stax-api-1.0.jar;lib/wstx-asl-2.8.2.jar
com.sosnoski.xmlbench.XMLBench -sb axiom docs/init.xml
docs/xmlformatter.xml docs/soaps
Running Axiom with 10 passes on file docs/init.xml (3604 bytes):
Document has 51 elements, 82 attributes with 1215 characters of
data, and 65 content text segments with 380 characters of text
Original text size was 3604, output text size was 3737
Build mn=152    Build av=256    Walk mn=275     Walk av=303
Build-Walk mn=427
Build-Walk av=559 Write mn=566 Write av=663 Mod mn=2 Mod av=2
Elems=51        Conts=65        Attrs=82        Text ch=380     Attr
ch=1215

Running Axiom with 10 passes on file docs/xmlformatter.xml (274920
bytes):
Document has 5009 elements, 1 attributes with 1 characters of data,
and 10017 content text segments with 92468 characters of text
Original text size was 274920, output text size was 269121
Build mn=158    Build av=178    Walk mn=24423   Walk av=25256
Build-Walk mn=24581
Build-Walk av=25434 Write mn=25519 Write av=26312 Mod mn=2 Mod av=2
Elems=5009      Conts=10017     Attrs=1         Text ch=92468   Attr
ch=1

Running Axiom with 10 passes on directory docs/soaps (30 files
totaling 19407 bytes):
Document has 211 elements, 162 attributes with 2431 characters of
data, and 72 content text segments with 452 characters of text
Original text size was 19407, output text size was 20490
Build mn=6136   Build av=6866   Walk mn=1356    Walk av=1668
Build-Walk mn=7492
Build-Walk av=8534 Write mn=8156 Write av=8653 Mod mn=2 Mod av=2
Elems=211       Conts=72        Attrs=162       Text ch=452     Attr
ch=2431


C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/jaxp.jar;lib/Piccolo.jar;lib/jdom.jar
com.sosnoski.xmlbench.XMLBench -sbmp4n -u com.bluecast.xml.Piccolo
jdom docs/init.xml docs/xmlformatter.xml docs/soaps
Running JDOM memory test with 4 passes on file docs/init.xml (3604
bytes):
Init mem=516152 Chg mem=533480  First sz=700392 Avg sz=-9522
Walked sz=-19786
Avg+Walked sz=-29308

Running JDOM memory test with 4 passes on file docs/xmlformatter.xml
(274920 bytes):
Init mem=1051736 Chg mem=1512   First sz=1479400 Avg sz=6157834
Walked sz=-6157954
Avg+Walked sz=-120

Running JDOM memory test with 4 passes on directory docs/soaps (30
files totaling 19407 bytes):
Init mem=1051656 Chg mem=6816   First sz=293616 Avg sz=5202
Walked sz=-61760
Avg+Walked sz=-56558


C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/jaxp.jar;lib/Piccolo.jar;lib/dom4j.jar
com.sosnoski.xmlbench.XMLBench -sbmp4n -u com.bluecast.xml.Piccolo
dom4j docs/init.xml docs/xmlformatter.xml docs/soaps
Running dom4j memory test with 4 passes on file docs/init.xml (3604
bytes):
Init mem=516160 Chg mem=531680  First sz=687664 Avg sz=-13730
Walked sz=-15917
Avg+Walked sz=-29647

Running dom4j memory test with 4 passes on file docs/xmlformatter.xml
(274920 bytes):
Init mem=1041864 Chg mem=7344   First sz=1168264 Avg sz=1105069
Walked sz=-1139941
Avg+Walked sz=-34872

Running dom4j memory test with 4 passes on directory docs/soaps (30
files totaling 19407 bytes):
Init mem=1050672 Chg mem=13352  First sz=178392 Avg sz=13842
Walked sz=-37320
Avg+Walked sz=-23478


C:\perf2>#java -Xms512M -Xmx512M -cp
bin;lib/dom4j.jar;lib/stax-api-1.0.jar;lib/wstx-asl-2.8.2.jar
com.sosnoski.xmlbench.XMLBench -sbmp4n dom4jstax docs/init.xml
docs/xmlformatter.xml docs/soaps
'#java' is not recognized as an internal or external command,
operable program or batch file.

C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/xmlParserAPIs.jar;lib/xercesImpl.jar
com.sosnoski.xmlbench.XMLBench -sbmp4n xerces2 docs/init.xml
docs/xmlformatter.xml docs/soaps
Running Xerces2 DOM memory test with 4 passes on file docs/init.xml
(3604 bytes):
Init mem=515616 Chg mem=230808  First sz=400208 Avg sz=-24584
Walked sz=-29778
Avg+Walked sz=-54362

Running Xerces2 DOM memory test with 4 passes on file
docs/xmlformatter.xml (274920 bytes):
Init mem=728464 Chg mem=6448    First sz=1682440 Avg sz=1657152
Walked sz=-2211264
Avg+Walked sz=-554112

Running Xerces2 DOM memory test with 4 passes on directory docs/soaps
(30 files totaling 19407 bytes):
Init mem=733768 Chg mem=3088    First sz=141112 Avg sz=72626
Walked sz=-87696
Avg+Walked sz=-15070


C:\perf2>java -Xms512M -Xmx512M -cp
bin;lib/axiom-api-SNAPSHOT.jar;lib/axiom-impl-SNAPSHOT.jar;lib/stax-api-1.0.jar;lib/wstx-asl-2.8.2.jar
com.sosnoski.xmlbench.XMLBench -sbmp4n axiom docs/init.xml
docs/xmlformatter.xml docs/soaps
Running Axiom memory test with 4 passes on file docs/init.xml (3604
bytes):
Init mem=576560 Chg mem=67832   First sz=166328 Avg sz=-19077
Walked sz=-13754
Avg+Walked sz=-32831

Running Axiom memory test with 4 passes on file docs/xmlformatter.xml
(274920 bytes):
Init mem=644584 Chg mem=1272    First sz=17320  Avg sz=14218
Walked sz=-16976
Avg+Walked sz=-2758

Running Axiom memory test with 4 passes on directory docs/soaps (30
files totaling 19407 bytes):
Init mem=649512 Chg mem=2552    First sz=450704 Avg sz=473432
Walked sz=-615925
Avg+Walked sz=-142493


C:\perf2>





--
Davanum Srinivas : http://wso2.com/blogs/


Reply via email to