XSLT Performance

Using Saxon on the commandline yields a significant performance hit as the JVM must startup each time. As a result, it’s sometime hard to judge performance of your stylesheets. It turns out Saxon 8 has an undocumented commandline switch that allows one to measure performance apart from the startup time. So, use the -3 switch, and the transformation is run three times.

Following are the processing times in milliseconds reported by Saxon in each of three successive runs on the example document included in my bib stylesheet archive:

2226
998
702

So, the first run is three times slower than the last, and the last is not too bad! Yes, advocates of xsltproc will note it would probably handle it faster. Still, my stylesheets are doing a lot of work, and XSLT 2.0 support in xsltproc is nowhere on the horizon as near as I can tell.

Comments are closed.


Creative Commons License Creative Commons License