On Wed, Jul 14, 2010 at 8:45 PM, Jeremy Boynes <jboy...@apache.org> 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 1800ms.
>
> In light of this I'd like to propose we switch to Jaxen and add it as a 
> dependency.

Absolutely: +1

Great work :)

Hen

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to