I have some existing Java code that does an XSLT transform programmatically - originally using Xalan. I have refactored it to be able to use another (externally configured) TransformerFactory.
I have tried using the Saxon (v6.5.3 and v8.7) factory, but do not see any perfromance improvements - if anything Saxon is slower and uses more memory than Xalan.
I understand that I could get some performance dvantage using the Saxon TinyTree, but can not figure out how to do so with this code.
My code is of the form;
TransformerFactory tf = (TransformerFactory) transformerFactoryClass.newInstance();
Transformer t = tf.newTransformer(pTransformFile);
t.transform(new StreamSource(pSourceFile), new StreamResult(pTargetFile));
Where 'transformerFactoryClass' is an instance of the configured TransformerFactory class
- org.apache.xalan.processor.TransformerFactoryImpl for Xalan
- net.sf.saxon.TransformerFactoryImpl for Saxon 8.7, and
- com.icl.saxon.TransformerFactoryImpl for Saxon 6.5.3
Any suggestions?