Page 1 of 1

docx4j XPath performance

PostPosted: Wed Nov 13, 2013 12:59 pm
by jason
Interesting posts at http://scn.sap.com/community/java/blog/ ... processing and http://stackoverflow.com/questions/6340 ... erformance where two guys independently establish that XPath performance can be improved significantly in their use cases by setting:

Code: Select all
-Dorg.apache.xml.dtm.DTMManager=org.apache.xml.dtm.ref.DTMManagerDefault

or

-Dcom.sun.org.apache.xml.internal.dtm.DTMManager=com.sun.org.apache.xml.internal.dtm.ref.DTMManagerDefault


In some brief testing in the context of docx4j with the org.apache.xml.dtm.DTMManager setting in Eclipse, I detected only a modest improvement of perhaps 5-10%. You might find a better improvement in a different environment and/or with docx4j using XPath differently to my tests. If so, please report back here!

These further refs don't provide much extra info:

- https://issues.apache.org/jira/browse/XALANJ-2540
- his blog: http://blog.jooq.org/2013/08/25/how-to- ... actor-10x/
- http://www.javacodegeeks.com/2013/09/ho ... r-10x.html