[jdom-interest] Is beta-5 much slower than beta-4?
Rajendra Paul
rajendra at loudeye.com
Mon Oct 16 15:42:59 PDT 2000
Based on a test described below, I am concerned that beta-5 is significantly
slower (like 50%) than beta-4. Could someone confirm whether my testing is
valid enough to be taken seriously? Test (test code attached) and results
are listed below. I ran the same test by first putting JDOM-b4.jar or
jdom(-b5).jar in classpath and then running the testcode.
TEST: (source code JDOMTester.java attached. Fairly straight forward but
sorry no documentation)
=============================================================
This test checks time for parsing XML documents and building XML documents.
I do 1000 iterations for both parsing and building, and repeat that two
times to generate the results.
Steps when parsing:
- read from a file containing an XML document into a string
- start timer (using System.currentMilliSeconds)
- parse that document by checking each element and attribute in that
document (no system. outs) 1000 times
- stop timer
- Report results for two such tests
Steps when building:
- Create a two-deep symmetric XML document where each element has two
attributes.
RESULTS:
========
Notes: fibo.xml is much smaller that classmosmaster.xml.
Part 1. With JDOM Beta-4
>set CLASSPATH=d:\jdom\lib\xerces.jar;d:\jdom\lib\jdom-b4.jar;.;
>java JDOMTester fibo.xml 2
============================================================================
===
Performance Metric Times for 2 trials
============================================================================
===
Parse times with 1000 iterations 9624 8372 with average of 8998
milliseconds
Build times with 1000 iterations 4596 4857 with average of 4726
milliseconds
============================================================================
===
>java JDOMTester classmosmaster.xml 2
============================================================================
===
Performance Metric Times for 2 trials
============================================================================
===
Parse times with 1000 iterations 48079 46497 with average of 47288
milliseconds
Build times with 1000 iterations 4857 4837 with average of 4847
milliseconds
============================================================================
===
Part 2. With JDOM Beta-5
>set JDOM_HOME=d:\jdom-b5
>set
CLASSPATH=d:\jdom-b5\lib\xerces.jar;d:\jdom-b5\build\jdom.jar;d:\jdom-b5\lib
\collections.jar;.;
>java JDOMTester fibo.xml 2
============================================================================
===
Performance Metric Times for 2 trials
============================================================================
===
Parse times with 1000 iterations 12938 10755 with average of 11846
milliseconds
Build times with 1000 iterations 8743 9124 with average of 8933
milliseconds
============================================================================
===
>java JDOMTester classmosmaster.xml 2
============================================================================
===
Performance Metric Times for 2 trials
============================================================================
===
Parse times with 1000 iterations 31265 28211 with average of 29738
milliseconds
Build times with 1000 iterations 3304 3315 with average of 3309
milliseconds
============================================================================
===
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JDOMTester.java
Type: application/octet-stream
Size: 6681 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20001016/f71ab81f/JDOMTester.obj
More information about the jdom-interest
mailing list