[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Saxon processing problem...
> On Sun, 2008-03-30 at 16:00 +0100, Michael Kay wrote: It was actually 23:00+0800, but my computer didn't know that. > > The other thing that would make the optimizer's life much > easier is to > > declare the types of parameters such as $grp-size, in this > case using > > 'as="xs:double"' in the xsl:param declaration. > > Is there a document or something that describes best > practices for making the (saxon) optimizer's life easier? Sadly, no. But I do tell people repeatedly that declaring the types of parameters is always recommended. Primarily because it's a good way of catching your programming mistakes, but it also means that the compiler has more information to work with. In this particular case the use of $grp-size inside an arithmetic expression inside a predicate caused Saxon to generate code to atomize the value of the variable and check that it was single-valued; it was then trying to move this code out of the predicate to avoid doing it repeatedly. If the type had been declared, then Saxon would have known that these run-time checks weren't needed and therefore didn't need to be optimized. None of which, of course, directly relates to the bug in question. Michael Kay http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|