Suggest performance improvement
Fix Committed on Branch:
Fixed in Maintenance Release:
We have a transform we need to run on large amount of documents like the one provided in the sample. Author of the XSLT claims, that when he runs transform from his oXygen, it completes consistently faster (cca 2x) than when he runs the same transform on the same document from our Java application. We tried to create smallest approximation of the code in the Main.java in the attached benchmark.jar (you can run it with java -jar benchmark.jar)
Is there anything we can do on the Java level to make the transform run faster?
Is there any performance improvement advice I can pass to the XSLT developer?
Anything that would reduce the transform time would be appreciated.
- File deleted (
I have deleted the attachment because it contained a license file. Please take care to keep license files secure.
The most obvious thing that comes to mind from a quick look at your code is: don't use a DOMSource. Saxon is about 5-10 times slower processing a DOM tree than using its own internal TinyTree model.
- Status changed from New to AwaitingInfo
- Assignee set to Michael Kay
Please let us know whether changing from DOMSource to Saxon's native TinyTree accounts for the difference.
If we don't hear further from you we will close this.
Thanks Michael and sorry for the license file, I didn't realize tickets are accessible to broader public.
How do we really get the TinyTree?
We ended up using SAXSource, and Apache Xerces with cache for DTDs, that helped substantially.
If you supply the input as a SAXSource then Saxon will construct a TinyTree by default, so it's doing the right thing here. You can exercise more control for example by using Saxon's DocumentBuilder class to build the tree.
Can we close this now?
Yes, we can close this ticket.
- Status changed from AwaitingInfo to Closed
Please register to edit this issue
Also available in: Atom