[Yanel-dev] Performance Thoughts about XSLT
Michael Wechner
michael.wechner at wyona.com
Mon Nov 5 14:59:34 CET 2012
Am 05.11.12 14:31, schrieb basZero:
> Hi Michael,
>
> I will check the details inside Yanel later this week, and I can share
> the results.
that would be great
>
> I also quickly read about XSLTC, the drawback is that you can not
> apply quick fixes in a XSL anymore, as XSL files are built and stored
> as class files, being part of the classpath. So changes to a XSL is
> only visible after a JVM restart...
I guess there are always some drawbacks ;-)
>
> Thanks for the quick answer, I'll update some facts later here about
> this topic.
Looking forward to it
Thanks
Michael
>
> Cheers
> Balz
>
>
> On Mon, Nov 5, 2012 at 2:03 PM, Michael Wechner
> <michael.wechner at wyona.com <mailto:michael.wechner at wyona.com>> wrote:
>
> Dear Balz
>
> Am 05.11.12 11:43, schrieb basZero:
>> dear all,
>>
>> I wonder the following and I'd be interested to hear your
>> thoughts about it:
>>
>> When creating a resource which is subclassed of Yanel's
>> BasicXMLResource, the following happens:
>>
>> - getView() gets called by Yanel
>> - then the resource's getContentXML() gets called: here you
>> prepare the XML document that at the end is passed to the XSL
>> transformation
>> - getTransformedInputStream() gets called: here the actual XSLT
>> is performed.
>>
>> I wonder the following regarding performance:
>>
>> - the XSLT process includes the transformation of XSL files into
>> Java template objects.
>> - The creation of such template objects certainly takes time and
>> is probably done for every request
>>
>> What can be done to reduce the time needed for the XSLT part of a
>> request time?
>
> Yanel currently uses Xalan 2.7.0, whereas it might make sense to
> upgrade to 2.7.1.
>
> Also I assume that Yanel currently is using the interpreter
> instead XSLTC. See
>
> http://marc.info/?l=xalan-j-users&m=122551369713293
> <http://marc.info/?l=xalan-j-users&m=122551369713293>
>
> but I guess we could change it rather easily or make it
> configurable somehow. (whereas we should check first what it is
> really using ;-)
>
>>
>> - Did anybody use precompiled templates (e.g.: the XSLT
>> transformer only compiles the XSL, if it has changed since the
>> last compilation), I read some articles about this
>> pre-compilation topic which should boost the whole XSLT time
>> dramatically
>> - Split up include files into smaller ones?
>>
>> Generally asking:
>> - Did you do anything specifically regarding performance of XSLT?
>
> no, because so far the XSLT was never the real problem. In most
> cases the bottleneck was rather the custom code, e.g.
> code which generated the XML to start with, but which didn't scale
> for whatever reasons.
>
>> - If so, what did you apply?
>
> My suggestion is to first check whether Yanel is using interpreter
> or XSLTC and if interpreter, then try to switch to XSLTC.
>
> Depending on how dynamic your page is, you could of course
> generate static files (with a double buffer) and then server them
> from the filesystem of even from the memory. (and maybe include
> the dynamic parts).
>
> HTH
>
> Michael
>>
>> Cheers
>> Balz
>>
>>
>
>
> --
> Yanel-development mailing list Yanel-development at wyona.com
> <mailto:Yanel-development at wyona.com>
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wyona.org/pipermail/yanel-development/attachments/20121105/5f28f356/attachment-0001.html>
More information about the Yanel-development
mailing list