[jdom-interest] xpb4j and DOMBuilder

Alex Rosen arosen at novell.com
Tue Apr 8 10:12:04 PDT 2003


Beta 8 contains code that hits a memory bug in various VMs, which
sometimes causes SAXBuilder to have terrible performance. Try the latest
code from CVS, or use Beta 9 when it comes out.

Alex


>>> "David Burns" <netdatax at hotmail.com> 4/7/2003 9:09:39 AM >>>
I have been researching parsing performance and wanted to compare
DOMBuilder and SAXBuilder in JDOM.  I cam across the XPB4J project
(http://www.pankaj-k.net/xpb4j) which has a test suite useful for
comparing various parsers.
 
After peeking at the JDOM driver, I updated it to use an iterator for
accessing the child List and also swapped in DOMBuilder.  The results
were unexpected, the DOMBuilder out-performed the SAXBuilder in both
speed and memory.
 
Any ideas what may be going on here?  I am using jdom beta 8 with
1.4.1_02 jdk.
 
Here are the full results:
run-sax:
     [echo] xpb.datadir = xmldata
  [xpbtask] Input Files: xmldata\res0.xml[12 KB]
  [xpbtask] ------------- xstat, sax, ops per run: 100 -------------
  [xpbtask] RUN :: AvgT/op (ms)    MemU/run (KB)
  [xpbtask]   0 :: 14              638
  [xpbtask]   1 :: 8               193
  [xpbtask]   2 :: 8               193
  [xpbtask]   3 :: 8               193
  [xpbtask] ------------------------------------------------------
run-dom:
  [xpbtask] Input Files: xmldata\res0.xml[12 KB]
  [xpbtask] ------------- xstat, dom, ops per run: 100 -------------
  [xpbtask] RUN :: AvgT/op (ms)    MemU/run (KB)
  [xpbtask]   0 :: 21              365
  [xpbtask]   1 :: 11              1459
  [xpbtask]   2 :: 11              1528
  [xpbtask]   3 :: 14              1528
  [xpbtask] ------------------------------------------------------
run-xpp:
  [xpbtask] Input Files: xmldata\res0.xml[12 KB]
  [xpbtask] ------------- xstat, xpp, ops per run: 100 -------------
  [xpbtask] RUN :: AvgT/op (ms)    MemU/run (KB)
  [xpbtask]   0 :: 13              259
  [xpbtask]   1 :: 8               168
  [xpbtask]   2 :: 8               168
  [xpbtask]   3 :: 8               168
  [xpbtask] ------------------------------------------------------
run-jdomdom:
  [xpbtask] Input Files: xmldata\res0.xml[12 KB]
  [xpbtask] ------------- xstat, jdomdom, ops per run: 100
-------------
  [xpbtask] RUN :: AvgT/op (ms)    MemU/run (KB)
  [xpbtask]   0 :: 35              1299
  [xpbtask]   1 :: 15              774
  [xpbtask]   2 :: 18              673
  [xpbtask]   3 :: 17              673
  [xpbtask] ------------------------------------------------------
run-jdomsax:
  [xpbtask] Input Files: xmldata\res0.xml[12 KB]
  [xpbtask] ------------- xstat, jdomsax, ops per run: 100
-------------
  [xpbtask] RUN :: AvgT/op (ms)    MemU/run (KB)
  [xpbtask]   0 :: 90              2295
  [xpbtask]   1 :: 90              2038
  [xpbtask]   2 :: 79              2062
  [xpbtask]   3 :: 81              1950
  [xpbtask] ------------------------------------------------------
run-xslt:
  [xpbtask] Input Files: xmldata\res0.xml[12 KB]
  [xpbtask] ------------- xstat, xslt, ops per run: 100 -------------
  [xpbtask] RUN :: AvgT/op (ms)    MemU/run (KB)
  [xpbtask]   0 :: 126             892
  [xpbtask]   1 :: 70              660
  [xpbtask]   2 :: 61              660
  [xpbtask]   3 :: 63              652
  [xpbtask] ------------------------------------------------------
run-dom4j:
  [xpbtask] Input Files: xmldata\res0.xml[12 KB]
  [xpbtask] ------------- xstat, dom4j, ops per run: 100 -------------
  [xpbtask] RUN :: AvgT/op (ms)    MemU/run (KB)
  [xpbtask]   0 :: 27              1262
  [xpbtask]   1 :: 14              955
  [xpbtask]   2 :: 18              955
  [xpbtask]   3 :: 30              955
  [xpbtask] ------------------------------------------------------




Tired of spam? Get advanced junk mail protection with MSN 8.
_______________________________________________ To control your
jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

 



More information about the jdom-interest mailing list