Performance tests with XML processors

Sorry for some broken links, it will be corrected.

Performance tests of an XSLT engine

XT is recognized as a good standard-compliant XSLT engine. To test with the last XSLT specification (W3C recommandation) and XPath specification, I used the win32 line-command version of  J. Clark's XT processor, available here at: http://home.effix.fr/technical/xml/Logiciels/XT/xt-win32.zip . Note that it uses for parser the XMLDOM DLL that goes with Internet Explorer 5.
Note that the IBM and Apache.org LotusXSL processor is slower than XT, and not tested here . The same software is called Xalan at apache.org and LotusXSL at IBM.

I made a small C++ file to create simple XML files of any size. A simple XSLT transform file is then applied to the simple XML file, and elapsed time and
max. memory usage are recorded.

The test.bat file contains:

cl createBigXMLfile.cpp
createBigXMLfile.exe > BigXMLfile.xml
ls -l BigXMLfile.xml
time /t
xt BigXMLfile.xml BigXMLfile.xslt
time /t

Performance tests of an DOM engine

Xerces C++

This test used IBM's XML4C XML parser and DOM (Document Object Model) implementation. The same software is called Xerces at apache.org and XML4C and XML4J at IBM. I took Xerces version 1.1.0 (
http://home.effix.fr/technical/xml/Logiciels/xerces-c_1_1_0-win32 ). DOMPrint is a sample C++ program realizing an identity transform, which I modified to realise the same search as the above simple XSLT transform file .

The testDOMPrintXerces.bat file contains:
time /t
\infra\dev\users\jmvanel\Etude_XML\Logiciels\xerces-c_1_1_0-win32\bin\jmvDOMPrint.exe BigXMLfile.xml
echo ^G

The VC6 project is here.

Performance tests of parsers

Expat

Expat is a light-weight and efficient C parser, widely used, e.g. in Mozilla. Like SAX (Simple API for XML) parsers, it works with call-backs and keeps nothing in memory. Like SAX parsers, it can be complemented with DOM API's above it.

I modifed the simple example program contained in the sample directory. Expat doc. at EFFIX .
Directory :    \\netapp1\tcs\infra\dev\users\jmvanel\Etude_XML\Logiciels\expat

Results

All elapsed time are in seconds (on a Getaway GP6-450Mhz).
Maximum memory usage are in Mega-bytes.
 
file size (Mb) XT time XT memory Xerces C++ time Xerces C++ memory Expat time Expat memory IE5 memory IE5 time
0.2 34 8
1 7 21.5 5 33.6 1 0.708
2 15 37.5 10 66.38
2.5 15 83
3 23 53.2 2 0.708
10 6 0.708

Comments on the results with IE5
I mesasure just the time during which the CPU is 100% loaded. The memory is the increment occuring when loading. The default XSLT style sheet is applied. Note that I had systematic complete crashes when the memory is exhausted.

Comments on the results with XT