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 Sat, 02 Oct 2010 18:08:31 GMT
On Jul 15, 2010, at 12:19 AM, Henri Yandell wrote:

> On Wed, Jul 14, 2010 at 8:45 PM, Jeremy Boynes <> wrote:
>> 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
>> In light of this I'd like to propose we switch to Jaxen and add it as a dependency.
> Absolutely: +1
> Great work :)

I've not committed these changes as the latest version of Jaxen is not available in the Maven
repo and there did not appear to be much interest in doing so. We might be able to get similar
improvements using JXPath.

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

View raw message