2010/10/3 Jeremy Boynes <jboy...@apache.org> > On Jul 15, 2010, at 12:19 AM, Henri Yandell wrote: > > > 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 :) > > 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. > > Could we start the release process without resolving this performance issue?
If not, the servicemix bundled jaxen http://repo1.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.jaxen/1.1.1_1/ might be a good choice as the dependency. -Rex > -- > Jeremy > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > > -- Lei Wang (Rex) rwonly AT apache.org