This second article focuses on the relative performance of these APIs as obtained by running the sample programs presented in the first article.
The measured time was the sum of the user and system times, as returned by the This second test compares the performance of regular XSLT engines and the XSLTC engine which compiles the style sheets into Java byte code.
They all follow the typical steps of using JAXP, and additionally include two loops to process the same document multiple times and in multiple runs. Two different SAX and DOM parser implementations have been used: Xerces and Crimson.
For each run, a factory is used to create a parser, a style sheet processor, and so on, which is in turn used to process an XML source document several times. This test measured the time to process XML documents describing 1000, 2000, 3000, 40 chessboard configurations.
The results presented here don't claim to cover all the API implementations available today but underline that the tradeoff between ease of use and performance of a chosen processing models can be biased by the implementation of the underlying parser, document builder or style sheet engine.
The sample programs presented in the first article demonstrated the use of the different APIs available to the Java developer.