You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Nuno Miguel Borges Leong <nu...@praxia.pt> on 2003/12/26 12:11:08 UTC

XSL a processor hog?

Hi, 

We have a web application using cocoon for presentation layer. I'm currently 
trying to optimise our XSL stylesheets since our initial results have shown it 
to be consuming too much processing time. Our pipeline structure consists in 
having a XSP generator (which uses SOAP requests to gather XML data) followed 
by 3-4 XSL transformations to process and transform it in HTML.

Our initial results sat somewhere between 1200-1500 ms for a single request 
(this is processing time for XSL only). I've since rebuild the XSL from 
scratch and i'm estimating 200-250ms for a single request. Still, i think this 
is too much. I'm finding XSL processing to be extremely slow (just copying the 
root element takes somewhere between 20-50 ms). Is this normal or i may doing 
something stupid ?

Using cocoon 2.1 over tomcat4.1.27 on a 2xP3-500 with 1Gb RAM. (CPU/memory 
never reaches 100% usage during tests. No swaps.). Using standard 
tomcat/cocoon configuration with Xalan XSLT processor.


Thanks
-- 
Nuno Leong
Práxia SI

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XSL a processor hog?

Posted by Upayavira <uv...@upaya.co.uk>.
J.Pietschmann wrote:

> Upayavira wrote:
>
>> Can you give instructions on how to get Saxon working? I tried but 
>> got hopelessly lost.
>
>
> If you run JDK 1.3 just remove the Xalan jar and add the Saxon jar
> to Cocoon's lib directory. It becomes more difficult with JDK 1.4,
> because moving the Saxon jar into the JDK's lib/endorsed will also
> cause Saxon's DOM to be used, which is read-only and leads to all
> kind of unpleasantness with Cocoon (in particular no meaningful
> logs).
>
> It may help to add a jar containing only an overriding service
> definition for javax.xml.transform.TransformerFactory pointing to
> Saxon's transformer factory to the JDK's lib/endorsed, but without
> adding the Saxon jar to the lib/endorsed classloaders might complain.
>
> I *think* there is a wiki entry about running Xalan and Saxon in
> parallel, but I can't find it right now.

Yup. On the DocBook page.

I've just got Saxon working. (Point being not to try and do these things 
when your head is like Cotton wool).

Unfortunately, I only 12 hits from 37 to 34 seconds (on my local 
machine). So I wonder if it is worth the effort (given that I've some 
Xalan extensions to rewrite). But I'll try again on a dedicated web 
server and see if the response is any better.

Regards, Upayavira


>
> J.Pietschmann
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XSL a processor hog?

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Upayavira wrote:
> Can you give instructions on how to get Saxon working? I tried but got 
> hopelessly lost.

If you run JDK 1.3 just remove the Xalan jar and add the Saxon jar
to Cocoon's lib directory. It becomes more difficult with JDK 1.4,
because moving the Saxon jar into the JDK's lib/endorsed will also
cause Saxon's DOM to be used, which is read-only and leads to all
kind of unpleasantness with Cocoon (in particular no meaningful
logs).

It may help to add a jar containing only an overriding service
definition for javax.xml.transform.TransformerFactory pointing to
Saxon's transformer factory to the JDK's lib/endorsed, but without
adding the Saxon jar to the lib/endorsed classloaders might complain.

I *think* there is a wiki entry about running Xalan and Saxon in
parallel, but I can't find it right now.

J.Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XSL a processor hog?

Posted by Upayavira <uv...@upaya.co.uk>.
Nicolas Toper wrote:

>Hi,
>You should try using Saxon which should be twice as fast and if you're not 
>using it already: XLTC instead of XSLT
>
Can you give instructions on how to get Saxon working? I tried but got 
hopelessly lost.

Regards, Upayavira

>Le Vendredi 26 Décembre 2003 12:11, Nuno Miguel Borges Leong a écrit :
>  
>
>>Hi,
>>
>>We have a web application using cocoon for presentation layer. I'm
>>currently trying to optimise our XSL stylesheets since our initial results
>>have shown it to be consuming too much processing time. Our pipeline
>>structure consists in having a XSP generator (which uses SOAP requests to
>>gather XML data) followed by 3-4 XSL transformations to process and
>>transform it in HTML.
>>
>>Our initial results sat somewhere between 1200-1500 ms for a single request
>>(this is processing time for XSL only). I've since rebuild the XSL from
>>scratch and i'm estimating 200-250ms for a single request. Still, i think
>>this is too much. I'm finding XSL processing to be extremely slow (just
>>copying the root element takes somewhere between 20-50 ms). Is this normal
>>or i may doing something stupid ?
>>
>>Using cocoon 2.1 over tomcat4.1.27 on a 2xP3-500 with 1Gb RAM. (CPU/memory
>>never reaches 100% usage during tests. No swaps.). Using standard
>>tomcat/cocoon configuration with Xalan XSLT processor.
>>
>>
>>Thanks
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XSL a processor hog?

Posted by Nicolas Toper <nt...@jouve.fr>.
Hi,
You should try using Saxon which should be twice as fast and if you're not 
using it already: XLTC instead of XSLT
Le Vendredi 26 Décembre 2003 12:11, Nuno Miguel Borges Leong a écrit :
> Hi,
>
> We have a web application using cocoon for presentation layer. I'm
> currently trying to optimise our XSL stylesheets since our initial results
> have shown it to be consuming too much processing time. Our pipeline
> structure consists in having a XSP generator (which uses SOAP requests to
> gather XML data) followed by 3-4 XSL transformations to process and
> transform it in HTML.
>
> Our initial results sat somewhere between 1200-1500 ms for a single request
> (this is processing time for XSL only). I've since rebuild the XSL from
> scratch and i'm estimating 200-250ms for a single request. Still, i think
> this is too much. I'm finding XSL processing to be extremely slow (just
> copying the root element takes somewhere between 20-50 ms). Is this normal
> or i may doing something stupid ?
>
> Using cocoon 2.1 over tomcat4.1.27 on a 2xP3-500 with 1Gb RAM. (CPU/memory
> never reaches 100% usage during tests. No swaps.). Using standard
> tomcat/cocoon configuration with Xalan XSLT processor.
>
>
> Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XSL a processor hog?

Posted by Litrik De Roy <co...@litrik.com>.
Nuno Miguel Borges Leong wrote:

>Hi, 
>
>Our initial results sat somewhere between 1200-1500 ms for a single request 
>(this is processing time for XSL only). I've since rebuild the XSL from 
>scratch and i'm estimating 200-250ms for a single request. Still, i think this 
>is too much. I'm finding XSL processing to be extremely slow (just copying the 
>root element takes somewhere between 20-50 ms). Is this normal or i may doing 
>something stupid ?
>
>
>  
>
The following tips might help:

http://www.jenitennison.com/xslt/performance.html
http://lists.fourthought.com/pipermail/4suite/2000-June/000167.html

-- 

Litrik De Roy
www.litrik.com



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org