Compiled XSLT stylesheets

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiled XSLT stylesheets

ncrofts
Hi,

I understand it is possible to 'compile' XSLT stylesheets using a saxon extension. Does anyone know if the Orbeon standard XSLT processor, oxf:xslt, uses this feature? If not, is this a straightforward extension, or would require a new custom processor?

Regards,
Neil
Reply | Threaded
Open this post in threaded view
|

Re: Compiled XSLT stylesheets

Erik Bruchez
Administrator
There is "compile" and compile ;)

Saxon always "compiles" a stylesheet in the sense that it goes through a processing phase where the stylesheet is analyzed. In Orbeon Forms, usually such "compiled" stylesheet are cached when possible (most of the time).

Now there is more to it if you check the Saxon product matrix:


If I understand well, Saxon can compile XQuery to native Java code, which "typically gives a 25% performance boost", but not XSLT yet. Also, Saxon can serialize "compiled" XSLT to disk, but "this feature does not normally deliver performance benefits".

At any rate, these are available in the commercial versions of Saxon only.

I suggest you ask on the Saxon mailing-list, or directly Saxonica / Mike Kay about which specific compilation feature could actually deliver increased performance to your stylesheets. And please report back here :)

-Erik

On Sat, Feb 26, 2011 at 12:39 PM, ncrofts <[hidden email]> wrote:
Hi,

I understand it is possible to 'compile' XSLT stylesheets using a saxon
extension. Does anyone know if the Orbeon standard XSLT processor, oxf:xslt,
uses this feature? If not, is this a straightforward extension, or would
require a new custom processor?

Regards,
Neil


--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Compiled-XSLT-stylesheets-tp3326236p3326236.html
Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Compiled XSLT stylesheets

ncrofts
Hi Erik,

Thanks for the information.

I notice a "compiled stylesheet" option is part of the saxon EE edition. Is that the form of compilation that takes place in Orbeon Forms? Also, when you say the results get cached, are the results persisted to disk, or is this a memory cache that will need refreshing each time the webapp is (re)started? Sorry for all the incessant questions!

Neil
Reply | Threaded
Open this post in threaded view
|

Re: Re: Compiled XSLT stylesheets

Erik Bruchez
Administrator
Neil,

I notice a "compiled stylesheet" option is part of the saxon EE edition. Is
that the form of compilation that takes place in Orbeon Forms?

No, Orbeon Forms uses the open source version of Saxon, which doesn't have this feature.
 
Also, when
you say the results get cached, are the results persisted to disk, or is
this a memory cache that will need refreshing each time the webapp is
(re)started?

It's in memory, not on disk.
 
Sorry for all the incessant questions!

No problem!

-Erik 


Neil


--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Compiled-XSLT-stylesheets-tp3326236p3326423.html
Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Compiled XSLT stylesheets

ncrofts
Erik,

Thanks for these clarifications.

I've been doing some additional research on the saxon compilation mechanism. It would seem that compilation to the saxon intermediate form is unlikely to bring significant performance benefit. For example:

"...  the facility for "compiling" stylesheets ... basically takes the optimized syntax tree produced by the Saxon compile-time code and serializes it as a data structure on disk, so that it can be reloaded and executed at any time. Frankly, there are no significant performance advantages in doing this compared with recompiling the source. "

Regards,
Neil