tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Boynes <>
Subject Re: [taglibs] XPath support
Date Thu, 15 Jul 2010 03:45:24 GMT
On Jul 12, 2010, at 7:04 PM, Jeremy Boynes wrote:

> I'm going to ping Xalan about the increase in time taken as expressions are evaluated
as I would assume I'm doing something silly.

I looked into the Xalan implementation and the problem appears to be in creation of the DTM
used by the underlying implementation. To evaluate the expression it walks up the DOM tree
to the parent and then iterates forward over the tree until it reaches the initial context
node. This leads to a linear increase in execution time as the context node progresses through
the NodeList from the <forEach>. 

I changed <x:forEach> and <x:out> to use Jaxen and did not see this issue. The
execution time for xpath evalutation over 1000 iterations was constant and substantially faster
than with Xalan: total of 62ms reparsing each time or 21ms if precompiled, down from 1800ms.

In light of this I'd like to propose we switch to Jaxen and add it as a dependency.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message