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
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
max. memory usage are recorded.
The test.bat file contains:
createBigXMLfile.exe > BigXMLfile.xml
ls -l BigXMLfile.xml
xt BigXMLfile.xml BigXMLfile.xslt
Performance tests of an DOM engine
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 (
). 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:
The VC6 project is here.
Performance tests of parsers
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
I modifed the simple example program contained in the sample
doc. at EFFIX .
Directory : \\netapp1\tcs\infra\dev\users\jmvanel\Etude_XML\Logiciels\expat
All elapsed time are in seconds (on a Getaway GP6-450Mhz).
Maximum memory usage are in Mega-bytes.
|file size (Mb)
||Xerces C++ time
||Xerces C++ memory
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
Comments on the results with XT
A little more than linear for elapsed time;
less than linear for max. memory usage
with a 6 Mbytes input file, I use up the memory of my 128 Mb machine ,
of which only 97 Mb were available; then swapping occurs and then the time
can be multiplied by 2