[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: SAXON and exsl:node-set -- problem solved

Subject: Re: SAXON and exsl:node-set -- problem solved
From: David Tolpin <dvd@xxxxxxxxxxxxxx>
Date: Sat, 17 Jan 2004 21:33:07 +0400 (AMT)
vector saxon java.util.vector
> Thanks for this insight. I'm sure there was no particular reason why the
> code was written the way it was - it's changed completely in Saxon 7.x.
> Interesting to see how dramatic the effect of a simple thing like this
> can be. The second argument to the Vector() constructor should have no
> effect on anything except performance.

Ok, I'll apply the patch to my version then. 

> I would be interested to know how you pinned it down.

I suspected that it happened due to an operation which was proportional to the
length of an array. There were two hypotheses:  
  - bad hash keys 
  - frequent copying of data (you mentioned copying of  trees).

To check the first hypothesis, I had replaced key lookups with xpath
expressions, expecting the performance to remain the same if the hypothesis
had been true; the stylesheet had run much longer. 

Then I looked for array declarations and found very few (which might be worth
checking), but discovered that java.util.Vector was used in many places. The
code for java/util/Vector checks whether the value for increment is zero, and
if it is, doubles the length, otherwise it just adds the increment to compute
the new length; there is also the only way to create Vector with non-zero
increment; that is, to call it with two arguments.

grep -E 'new Vector *([^)]+,[^)]+)' `find . -name '*.java'` 

(-E turns on 'normal' regular expressions)

has brought the right place.

> (As you probably realise, development on the Saxon 6.5 branch, apart from bug
> fixes, stopped over two years ago).

Yes, but XSLT 1.0 is still the most widely used variant of XSLT, and SAXON is
indeed the best XSLT processor of those available to me. I am having difficulty
learning the bigger XSLT 2.0 specification. Do you recommend already to use
SAXON 7 for XSLT 1.0 too? Is it mature enough for that?

David Tolpin

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.