|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] optimizing the hell out of XSLT :-)
Hi Michael and other XSLT engine builders,
among all this lazy evaluation and optimization how about piping SAXON events right into templates building only partial trees? Suppose a transform doesn't use global forward access with XPath but only accesses the local area in the current node and nodes seen before. Could be a bit faster that way, and more memory efficient? Are you guys thinking of doing this? I tried the preview mode in Saxon and that is nice in some special cases, certainly. But think this could be done generally. I'm not telling any news I guess. As for a related matter, how about piping data through variables? Consider this: <xsl:variable name="intermediary"> <xsl:apply-templates mode="preprocess" select="."/> </xsl:variable> <xsl:apply-templates select="$intermediary"/> basically from what I understand about Saxon internals, the variable body is evaluated by setting the Outputter/Emitter to the TinytreeBuilder, then the whole thing gets buffered in a new tree. When that is finished, the second apply-templates is run. Now, with SAX one cound pipe events right from the result of applying . in preprocess mode to the next apply-templates. Again, if there is no forward searching XPath it should go right through. One notch more: even if there is XPath trying to look ahead a little bit, one could wait until enough of a tree has been built. Even if an XPath expression does look ahead through the whole document (e.g., select="//something") one could apply that same lazy-evaluation principle (the SequenceIntent class is already a start.) Finally, finally, one could have the various apply-template jobs run in different threads on different CPUs, even through a network on different machines. Sounds good, doesn't it? (Especially if I don't have to do all that :-) Thanks so much for what you already have done! regards, -Gunther
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








