Those interested in the Xalan benchmarking, I've created -prof output.
Available to anyone on demand. (300k zipped)

I read this output using :
http://www.capital.net/~dittmer/profileviewer/

A(ll) lot of our time is going to calling the
org.apache.xpath.XPathAPI.selectNodeList method and I only focused on that
when I run our program.


When looking at some of the % of the calls :
18.7%  org.apache.xml.utils.SuballocatedIntVector.setElementAt();
5.3%  org.apache.xerces.dom.NodeImpl.getLocalName()
4.7%  org.apache.xerces.dom.ElementImpl.getNodeType()
4.4% org.apache.xerces.dom.NodeImpl.needsSyncData()
2.6% org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.addNode();
1.5% org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.nextNode();

% in time of program :
95.9%  org.apache.xpath.XPathAPI.eval
93.1%  org.apache.xpath.XpathContext.getDTMHandleFromNode
9x % org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.x (various methods)

I don't know if the Vector in org.apache.xml.utils.SuballocatedIntVector
means a Vector is used indeed.
Maybe some other collection might be faster. (ArrayList is said to be
faster)
I'm not an optimisation specialist.  Several websites can be consulted for
that matter.

Then I ran our app using Xalan2.1 final
Percentages in calls :
12.8% org.apache.xerces.dom.NodeImpl.isOwned()
12.4% org.apache.xerces.dom.ChildNode.getParentNode()
12.3% org.apache.xpath.DOM2Helper.getParentOfNode()
1.9% org.apache.xerces.dom.DocumentImpl.getNodeType()
1.4% org.apache.xpath axes.LocPathIterator.getWaiting()

percentages in time of program :
21%  org.apache.xerces.dom.ChildNode.getParentNode()
32% org.apache.xpath.DOM2Helper.getParentOfNode()
43% org.apache.xpath.axes.AxesWalker.checkWaiting()  (!!!!!!)
40.9%  org.apache.xpath.axes.AxesWalker.checkOkToTraverse()
....

Geert

Reply via email to