> After struggling with some DSL connection problems I've finally got my
> benchmark program and results from an initial set of tests
> online. This
> compares the performance of Crimson and Xerces DOM representations, as
> well as JDOM, dom4j, and Electric XML. The main page is at
>http://www.sosnoski.com/opensrc/xmlbench/index.html>
Thanks again for doing this. While the results are somewhat disapointing,
they do provide some context for improvement and with a few of the tests, a
concrete target. I will take a look at your code. The difference you
report here between xerces-d and JDOM is nothing like what my own tests have
shown. The only real difference I know about is the size of the document
but unfortunately, generating a trace for a 100K doc is not practical.
IMHO, the view of JDOM being lightweight, though currently under stress, is
in fact because of the fact that a faster parser could be used, if one were
available. JDOM can't ever be faster than the sax parser it's based on now
but a custom parser could be faster. I think it's important to note that in
my analysis for which I posted graphs, JDOM accounted for around 30% of the
build time itself with the underlying parser accounting for the rest. That
would indicate that there is only room for a fraction of a 30% performance
gain unless someway could be found to improve the parsers portion of the
time. I need to find out why this is not reflected in your results.
> Please let me know if you see any errors or have any suggestsion for
> improvements in the tests. I'm planning to add an update in a
> couple of
> weeks with results using new versions of the code bases,
> small files in
> addition to the medium sized (100-200K) ones used for these tests, and
> some added tests.
Yes, the smaller ones, 5-20K are much more relavent to me personally though
RPC is not the reason. My experience with serialization of small documents
has been very good and in the place I am using it, I don't have the option
of xml serialization.
I decided to download and run your tests against the almost current version
(which didn't make much difference) and the small document I was using
(sorry, but I can't release that document but I am just using it for
comparison). The makeup of the document is reported in the results. The
results are closer to my own findings.
-------------- next part --------------
E:\xml\xmlbench>java -Xms128M -Xmx128M -cp lib\xmlbm.jar;lib\jaxp.jar;lib\xerces.jar;lib\crimson.jar;c:\temp\jdom\build\classes;lib\dom4j.jar;lib\EXML.jar com.sosnoski.xmlbench.XMLBench e:\temp\testLayout.xml 40
Java version 1.2.2
Classic VM
1.2.2
Sun Microsystems Inc.
Running tests with 40 copies of "e:\temp\testLayout.xml"
Beginning test pass for SAX
Parsed document text in 1182 ms.
Found 73 elements, 369 attributes, and 1022 characters of text
Beginning test pass for Crimson DOM
Built from parse in 951 ms.
Walked tree in 30 ms.
Generated text in 491 ms.
**Serialization not supported**
Found 2920 elements, 14760 attributes, and 40880 characters of text
Original text size was 7491, output text size was 8084
Beginning test pass for JDOM
Built from parse in 1002 ms.
Walked tree in 60 ms.
Generated text in 711 ms.
Serialized in 1392 ms.
Unserialized in 1842 ms.
Found 2920 elements, 14760 attributes, and 40880 characters of text
Original text size was 7491, output text size was 7364
Serialized length was 18220
Beginning test pass for dom4j
Built from parse in 892 ms.
Walked tree in 40 ms.
Generated text in 761 ms.
**Serialization not supported**
Found 2920 elements, 14760 attributes, and 40880 characters of text
Original text size was 7491, output text size was 7360
Beginning test pass for Xerces DOM base
Built from parse in 3385 ms.
Walked tree in 20 ms.
Generated text in 921 ms.
Serialized in 2193 ms.
Unserialized in 2734 ms.
Found 2920 elements, 14760 attributes, and 40880 characters of text
Original text size was 7491, output text size was 7359
Serialized length was 31800
Beginning test pass for Xerces DOM deferred
Built from parse in 471 ms.
Walked tree in 140 ms.
Generated text in 601 ms.
Serialized in 2203 ms.
Unserialized in 2594 ms.
Found 2920 elements, 14760 attributes, and 40880 characters of text
Original text size was 7491, output text size was 7359
Serialized length was 32392
Beginning test pass for Electric XML
Built from parse in 1963 ms.
Walked tree in 30 ms.
Generated text in 1902 ms.
Serialized in 1493 ms.
Unserialized in 1532 ms.
Found 2920 elements, 14760 attributes, and 16600 characters of text
Original text size was 7491, output text size was 7469
Serialized length was 24133