You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Marco Spinetti <m....@pisa.iol.it> on 2001/01/25 16:50:15 UTC

PERFORMANCE PROBLEM!

Hi all,
my question is how I can increase my system performances. I have built a multiterminal Xml portal based on Cocoon: in the service of meteo forecasts for every request my system uses 1,6 second: using the Profiler.xml file I found out that this time is so subdivided:

36 ms (org-apache-cocoon-producer-ProducerFromFile)
408 ms (org.apache.cocoon.processor.xsp.XSPProcessor)
938 ms (org.apache.cocoon.processor.xslt.XSLTProcessor-1)
247 ms (org-apache-cocoon-formatter-HTMLFormatter)
54 ms (Outputting)

These data are terrible for a site that go in production: my boss has asked me to increase the performances. How can I do? I use Cocoon 1.8, Jakarta Tomcat Servlet Engine, the XSLT Xalan processor and the Xerces parser: using XT do I improve the performances? 
Please help me
Marco
m.spinetti@pisa.iol.it


Re: PERFORMANCE PROBLEM!

Posted by Michele Bianchi <mi...@research.telcordia.com>.
On Thu, 25 Jan 2001, Echoes wrote:

> > Marco Spinetti wrote:
> > 
> > Hi all,
> > my question is how I can increase my system performances. I have built
> > a multiterminal Xml portal based on Cocoon: in the service of meteo
> > forecasts for every request my system uses 1,6 second: using the
> > Profiler.xml file I found out that this time is so subdivided:
> > 
> > 36 ms (org-apache-cocoon-producer-ProducerFromFile)
> > 408 ms (org.apache.cocoon.processor.xsp.XSPProcessor)
> > 938 ms (org.apache.cocoon.processor.xslt.XSLTProcessor-1)
> > 247 ms (org-apache-cocoon-formatter-HTMLFormatter)
> > 54 ms (Outputting)
> > 
> > These data are terrible for a site that go in production: my boss has
> > asked me to increase the performances. How can I do? I use Cocoon 1.8,
> > Jakarta Tomcat Servlet Engine, the XSLT Xalan processor and the Xerces
> > parser: using XT do I improve the performances?
> 
>  Using XT is a good idea, and switching from Tomcat to resin is not bad
> either. 
>  On my Linux box, i've also noticed that the jdk1.3 from Sun is really
> faster than 1.2.2

i've no experince of xt, but jdk1.3 ibm is really faster.  i suggest you also
jikes for the "1st step compilation".

i've reasonable fast results (about 500ms-1500ms) with all the pages, with a
lot of logic i mean.  i keep attention not to abuse of xsl.

-------------------------------------------------------------------------------
dott. michele bianchi                                       power of two s.r.l.
phone +39 335 5384700                                      http://www.pow2.com


Re: PERFORMANCE PROBLEM!

Posted by Echoes <ec...@free.fr>.
> Marco Spinetti wrote:
> 
> Hi all,
> my question is how I can increase my system performances. I have built
> a multiterminal Xml portal based on Cocoon: in the service of meteo
> forecasts for every request my system uses 1,6 second: using the
> Profiler.xml file I found out that this time is so subdivided:
> 
> 36 ms (org-apache-cocoon-producer-ProducerFromFile)
> 408 ms (org.apache.cocoon.processor.xsp.XSPProcessor)
> 938 ms (org.apache.cocoon.processor.xslt.XSLTProcessor-1)
> 247 ms (org-apache-cocoon-formatter-HTMLFormatter)
> 54 ms (Outputting)
> 
> These data are terrible for a site that go in production: my boss has
> asked me to increase the performances. How can I do? I use Cocoon 1.8,
> Jakarta Tomcat Servlet Engine, the XSLT Xalan processor and the Xerces
> parser: using XT do I improve the performances?

 Using XT is a good idea, and switching from Tomcat to resin is not bad
either. 
 On my Linux box, i've also noticed that the jdk1.3 from Sun is really
faster than 1.2.2

	Eugène

RE: [C1][Patch] Saxon and Cocoon1.8.1 [Was:Re: PERFORMANCE PROBLEM!]

Posted by Donald Ball <ba...@webslingerZ.com>.
On Mon, 29 Jan 2001, Martin Sevigny wrote:

> OK, I've got it straight with a dirty hack.
>
> Here's what works on NT (and Linux):
>
> - Cocoon 1.8.2 CVS January 26th
> - Saxon 6.1 from Steffen (posted earlier: http://www.stundzig.de/saxon6.1_unofficial.jar (ca: 550kB))
> - SaxonTransformer.java from Steffen or CVS with this little modification:
>
> Add:
>
> if ( sheetBase != null )
> {
>   File f = new File(sheetBase);
>   sheetBase = f.toURL().toString();
> }

can you send me a cvs diff of this patch? it was ambiguous to me where
this should go.

- donald


RE: [C1][Patch] Saxon and Cocoon1.8.1 [Was:Re: PERFORMANCE PROBLEM!]

Posted by Martin Sevigny <se...@ajlsm.com>.
Steffen and all others wanting to use Saxon with Cocoon,

> aah. Now it's clear to me, I think. :-) You don't use the latest 
> cocoon from
> CVS? There is a bug in org.apache.cocoon.processor.xsp.XSPProcessor.
> The xsp stylesheet is initialized with null and therefore saxon 
> throws this exception. I've send the patch at 01/01/19 to cocoon-dev and
> in the current CVS it's fixed.

OK, I've got it straight with a dirty hack.

Here's what works on NT (and Linux):

- Cocoon 1.8.2 CVS January 26th
- Saxon 6.1 from Steffen (posted earlier: http://www.stundzig.de/saxon6.1_unofficial.jar (ca: 550kB))
- SaxonTransformer.java from Steffen or CVS with this little modification:

Add: 

if ( sheetBase != null )
{
  File f = new File(sheetBase);
  sheetBase = f.toURL().toString();
}

before the DOMSource construction (in javax.xml.transform.Transformer).

This will make sure that Saxon receives a base URI in URL form, such as "file:/xxx". And now it works. There is probably a more elegant way and more robust, but it's for another time. It works under Linux too, by the way.

A few advices to all of you trying to make Saxon work with Cocoon:

- Saxon is in general less forgiving about errors in XSLT than Xalan. Some XSLT files can work with Xalan but not with Saxon, so make sure you test your XSLT files carefully.

- I've tried to use the ESQL taglib from Cocoon 1.8.2 with Saxon, and it failed to compile the logicsheet! I've not tested much, because I had to change it anyway, but it looked like one of these errors due to the lack of forgiveness of Saxon

Now Saxon works, and my app is really quicker.

Thank's a lot for your help,

Martin Sévigny


Re: [C1][Patch] Saxon and Cocoon1.8.1 [Was:Re: PERFORMANCE PROBLEM!]

Posted by Steffen Stundzig <st...@smb-tec.com>.
Hi Martin,

/**
 * @author: "Martin Sevigny" <se...@ajlsm.com> 
 * @date: Fri, 26 Jan 2001 18:42:57 +0100
 */
> Steffen,
> 
> That's what I was getting. I've thrown away all my compiled XSP pages and now it can't compile my logicsheets, I get this stack trace:
> 
> java.lang.NullPointerException: URI may not be null

aah. Now it's clear to me, I think. :-) You don't use the latest cocoon from
CVS? There is a bug in org.apache.cocoon.processor.xsp.XSPProcessor.
The xsp stylesheet is initialized with null and therefore saxon 
throws this exception. I've send the patch at 01/01/19 to cocoon-dev and
in the current CVS it's fixed.

The patch was:

Index: src/org/apache/cocoon/processor/xsp/XSPProcessor.java
 ===================================================================
 RCS file: /home/cvspublic/xml-cocoon/src/org/apache/cocoon/processor/xsp/XSPProcessor.java,v
 retrieving revision 1.37
 diff -r1.37 XSPProcessor.java
 169d168
 <             XSPLogicsheet logicsheet = new XSPLogicsheet(transformer, parser, null);
 182a182,185
 > 
 >             XSPLogicsheet logicsheet = new XSPLogicsheet(transformer, parser, 
 >                     this.getClass().getResource(logicsheetName).toString()); 
 >                     

Regards
	Steffen...
-- 
______________________________________________________________________
Steffen Stundzig                            mailto:steffen@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com




RE: [C1][Patch] Saxon and Cocoon1.8.1 [Was:Re: PERFORMANCE PROBLEM!]

Posted by Martin Sevigny <se...@ajlsm.com>.
Steffen,

> Do you receive an error from Saxon such as 
>    javax.xml.transform.TransformerConfigurationException: 
>              Failed to compile stylesheet. 1 error detected.

That's what I was getting. I've thrown away all my compiled XSP pages and now it can't compile my logicsheets, I get this stack trace:

java.lang.NullPointerException: URI may not be null
	at com.icl.saxon.tree.DocumentImpl.setSystemId(DocumentImpl.java:123)
	at com.icl.saxon.tree.TreeBuilder.startDocument(TreeBuilder.java:89)
	at com.icl.saxon.output.ProxyEmitter.startDocument(ProxyEmitter.java:61)
	at com.icl.saxon.Stripper.startDocument(Stripper.java:109)
	at com.icl.saxon.ContentEmitter.startDocument(ContentEmitter.java:61)
	at com.icl.saxon.DOMDriver.parse(DOMDriver.java:190)
	at com.icl.saxon.DOMDriver.parse(DOMDriver.java:162)
	at com.icl.saxon.Builder.build(Builder.java:252)
	at com.icl.saxon.PreparedStyleSheet.prepare(PreparedStyleSheet.java:107)
	at com.icl.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:119)
	at org.apache.cocoon.transformer.SAXONTransformer.getTransformer(SAXONTransformer.java:310)
	at org.apache.cocoon.transformer.SAXONTransformer.transform(SAXONTransformer.java, Compiled Code)
	at org.apache.cocoon.processor.xsp.XSPLogicsheet.apply(XSPLogicsheet.java:102)
	at org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java, Compiled Code)
	at org.apache.cocoon.Engine.handle(Engine.java, Compiled Code)
	at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
	at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
	at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
	at java.lang.Thread.run(Unknown Source)

When SaxonTransformer is called, the sheetBase property is correctly set to "file:/d:/..." up to the logicsheet.

> or occurs this error before Saxon is invoked? 
> It looks like an Windows specific error on method getResource() in the 
> org.apache.cocoon.processor.xslt.XSLTProcessor class, because there was  
> created an URL based on the method Utils.getRootPath(). I class 
> Utils I found the
> following comment:
> 
>  // FIXME (SM): I have _no_absolute_idea_ how much this is 
> portable. The whole
>  // architecture should be based on URL rather than Files to allow the 
>  // use of Servlet 2.2 getResource() to void calling such nasty methods
>  // but for now, well, it's the best I can do :(
>  return request.getRealPath("/");
> 
> Any ideas to fix it?

Not for now, but I don't think my problem is there...

Thank's a lot again,

Martin


Re: [C1][Patch] Saxon and Cocoon1.8.1 [Was:Re: PERFORMANCE PROBLEM!]

Posted by Steffen Stundzig <st...@smb-tec.com>.
Hi Martin,

/**
 * @author: "Martin Sevigny" <se...@ajlsm.com> 
 * @date: Fri, 26 Jan 2001 17:53:58 +0100
 */
> Steffen,
> 
> > > Error on xsl:import on line ...
> > >  d:\currentdir\d:\path_to_xsl\file_to_import.xsl (file not found)
> > 
> > do you wrote down the absolut filename with the complete path in your
> > <xsl:import> element?
> > 
> > If so, insert a "file:/" before the path and test it?
> 
> The calling stylesheet is in d:\path_to_xsl\, and the called stylesheet too.
> 
> In Xalan:
> 
> <xsl:import href="file_to_import.xsl"/> works
> 
> In Saxon:
> 
> <xsl:import href="file_to_import.xsl"/> does'nt work
> <xsl:import href="d:\path_to_xsl\file_to_import.xsl"/> does'nt work
> <xsl:import href="file:/d:\path_to_xsl\file_to_import.xsl"/> works
> 
> I've checked the sheetBase parameter passed to SaxonTransformer.getTransformer, and it is correctly set to the calling stylesheet, in the form "d:\path_to_xsl\...".
> 
> It can compile logicsheets neither, but this time the sheetBase property is set to something beginning with "file:/d:/...".
> 
> Any other idea? Trace doesn't help, my stylesheet is never compiled.

Do you receive an error from Saxon such as 
   javax.xml.transform.TransformerConfigurationException: 
             Failed to compile stylesheet. 1 error detected.

or occurs this error before Saxon is invoked? 
It looks like an Windows specific error on method getResource() in the 
org.apache.cocoon.processor.xslt.XSLTProcessor class, because there was  
created an URL based on the method Utils.getRootPath(). I class Utils I found the
following comment:

 // FIXME (SM): I have _no_absolute_idea_ how much this is portable. The whole
 // architecture should be based on URL rather than Files to allow the 
 // use of Servlet 2.2 getResource() to void calling such nasty methods
 // but for now, well, it's the best I can do :(
 return request.getRealPath("/");

Any ideas to fix it?

Regards
	Steffen...

-- 
______________________________________________________________________
Steffen Stundzig                            mailto:steffen@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com




RE: [C1][Patch] Saxon and Cocoon1.8.1 [Was:Re: PERFORMANCE PROBLEM!]

Posted by Martin Sevigny <se...@ajlsm.com>.
Steffen,

> > Error on xsl:import on line ...
> >  d:\currentdir\d:\path_to_xsl\file_to_import.xsl (file not found)
> 
> do you wrote down the absolut filename with the complete path in your
> <xsl:import> element?
> 
> If so, insert a "file:/" before the path and test it?

The calling stylesheet is in d:\path_to_xsl\, and the called stylesheet too.

In Xalan:

<xsl:import href="file_to_import.xsl"/> works

In Saxon:

<xsl:import href="file_to_import.xsl"/> does'nt work
<xsl:import href="d:\path_to_xsl\file_to_import.xsl"/> does'nt work
<xsl:import href="file:/d:\path_to_xsl\file_to_import.xsl"/> works

I've checked the sheetBase parameter passed to SaxonTransformer.getTransformer, and it is correctly set to the calling stylesheet, in the form "d:\path_to_xsl\...".

It can compile logicsheets neither, but this time the sheetBase property is set to something beginning with "file:/d:/...".

Any other idea? Trace doesn't help, my stylesheet is never compiled.

Thanks,

Martin Sévigny


Re: [C1][Patch] Saxon and Cocoon1.8.1 [Was:Re: PERFORMANCE PROBLEM!]

Posted by Steffen Stundzig <st...@smb-tec.com>.
Hi Martin,

/**
 * @author: "Martin Sevigny" <se...@ajlsm.com> 
 * @date: Fri, 26 Jan 2001 17:27:09 +0100
 */
> Steffen,
> 
> > You get an error message from cocoon? 
> 
> I get this:
> 
> Error on xsl:import on line ...
>  d:\currentdir\d:\path_to_xsl\file_to_import.xsl (file not found)

do you wrote down the absolut filename with the complete path in your
<xsl:import> element?

If so, insert a "file:/" before the path and test it?

Hope that helps
	Steffen... 

-- 
______________________________________________________________________
Steffen Stundzig                            mailto:steffen@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com




RE: [C1][Patch] Saxon and Cocoon1.8.1 [Was:Re: PERFORMANCE PROBLEM!]

Posted by Martin Sevigny <se...@ajlsm.com>.
Steffen,

> > Thank's for the contribution. Just a question: have you tested 
> it with <xsl:import>, <xsl:include> or document() statements in 
> XSLT? I'm having trouble with stylesheets containing them, and 
> before going too deep I would like to know if it's a known limitation.
> > 
> > Running those stylesheet from the command line works fine, but 
> not with Cocoon...
> > 
> you are using the original unpatched saxon package from michael 
> kay's homepage?

No, yours, I just doublechecked.

> You get an error message from cocoon? 

I get this:

Error on xsl:import on line ...
 d:\currentdir\d:\path_to_xsl\file_to_import.xsl (file not found)

As you can see, it appends the current dir to the complete path of the XSL it tries to import.

I'm on Windows NT, could it be the problem?

Thank's for your help, I've seen that Saxon is around 30% faster than Xalan for my application, I would like to make it work.

Martin Sévigny


Re: [C1][Patch] Saxon and Cocoon1.8.1 [Was:Re: PERFORMANCE PROBLEM!]

Posted by Steffen Stundzig <st...@smb-tec.com>.
Hi Martin,

/**
 * @author: "Martin Sevigny" <se...@ajlsm.com> 
 * @date: Fri, 26 Jan 2001 16:41:17 +0100
 */
> Steffen,
> 
> Thank's for the contribution. Just a question: have you tested it with <xsl:import>, <xsl:include> or document() statements in XSLT? I'm having trouble with stylesheets containing them, and before going too deep I would like to know if it's a known limitation.
> 
> Running those stylesheet from the command line works fine, but not with Cocoon...
> 
you are using the original unpatched saxon package from michael kay's homepage?
You get an error message from cocoon? 
It could be a good choice to enable 'trace' of your saxon transformer.
See the cocoon.properties attached in my email this morning. 

I could use all of your statements above with relative filenames such as 
   <xsl:import href="../intranet.xsl"/> or <xsl:include href="../file.xsl"/>

and also the method document() e.g. "document('commands.xml')". 
The file commands.xml resists in the same directory as the stylesheet 
that includes it. 

Absolut URL's that starts with "file://" should also work.

Regards
	Steffen...

-- 
______________________________________________________________________
Steffen Stundzig                            mailto:steffen@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com




Re: [C1][Patch] Saxon and Cocoon1.8.1 [Was:Re: PERFORMANCE PROBLEM!]

Posted by Donald Ball <ba...@webslingerZ.com>.
i added this to cvs. thanks!

- donald


[C1][Patch] Saxon and Cocoon1.8.1 [Was:Re: PERFORMANCE PROBLEM!]

Posted by Steffen Stundzig <st...@smb-tec.com>.
Hi Ovidiu,

/**
 * @author: Ovidiu Predescu <ov...@cup.hp.com> 
 * @date: Thu, 25 Jan 2001 08:36:24 -0800
 */
> On Thu, 25 Jan 2001 17:04:36 +0100, Steffen Stundzig <st...@smb-tec.com> 
> wrote:
> 
> Steffen, could you please post your changes to the mailing list?

here are my way to get Cocoon 1.8.1 working with Saxon6.1.
I've tested it with the latest update from the cocoon CVS, but it should
work also with older versions.

1. Put the attached SAXONTransformer into the Cocoon source tree.
2. [Patch] Put the initialization of the 'store' actor in the 
   Cocoon Engine before the initialization of the 'transformer'. This
   is needed, because the transformer needs the 'store' for caching.
3. Modify the part 'XSLT Transformer' in your 'cocoon.properties' file, 
   to use the SAXONTransformer. See my file snippet for details.
4. Put the saxon.jar in your 'cocoon' classpath and recompile cocoon.
5. Put the saxon.jar in your 'project' classpath, start your servlet
   engine and have fun. :-)

You can found the saxon.jar at 
   http://users.iclway.co.uk/mhkay/saxon/
but the current version 6.1 has a small bug in the sourcefile
   com.icl.saxon.StandardURIResolver.java line 112 and 113.
There an URI with "file:/" is constructed, but it must only be "file:". 
Michael Kay has applied this patch into his original source tree, but
his hasn't updated the download package. So you can download the
saxon package from the URL above, fix the bug and recompile them or
you could use my precompiled saxon version at 
   http://www.stundzig.de/saxon6.1_unofficial.jar (ca: 550kB).

Hints and criticism are very welcome. This description comes WITHOUT ANY
WARRANTY. :-)


Best regards
	Steffen...


-- 
______________________________________________________________________
Steffen Stundzig                            mailto:steffen@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com




R: PERFORMANCE PROBLEM! (for Steffen)

Posted by Marco Spinetti <m....@pisa.iol.it>.
Hi Steffen
you would do me a big pleasure if you could send me your patches so that I
can try them to see if the performances of my system improve. I have brought
my Cocoon version up to date at 8.1.2: is it equally right?
I send you also my address.
Regards
Marco
m.spinetti@pisa.iol.it

----- Original Message -----
From: Steffen Stundzig <st...@smb-tec.com>
To: <co...@xml.apache.org>
Sent: Thursday, January 25, 2001 5:04 PM
Subject: Re: PERFORMANCE PROBLEM!


> Hi Marco,
>
> /**
>  * @author: "Marco Spinetti" <m....@pisa.iol.it>
>  * @date: Thu, 25 Jan 2001 16:50:15 +0100
>  */
> > Hi all,
> > my question is how I can increase my system performances. I have built a
> multiterminal Xml portal based on Cocoon: in the service of meteo
forecasts
> for every request my system uses 1,6 second: using the Profiler.xml file I
> found out that this time is so subdivided:
> >
> > 36 ms (org-apache-cocoon-producer-ProducerFromFile)
> > 408 ms (org.apache.cocoon.processor.xsp.XSPProcessor)
> > 938 ms (org.apache.cocoon.processor.xslt.XSLTProcessor-1)
> > 247 ms (org-apache-cocoon-formatter-HTMLFormatter)
> > 54 ms (Outputting)
> >
> > These data are terrible for a site that go in production: my boss has
asked
> me to increase the performances. How can I do? I use Cocoon 1.8, Jakarta
> Tomcat Servlet Engine, the XSLT Xalan processor and the Xerces parser:
using
> XT do I improve the performances?
>
> I'm using cocoon 1.8.1 with the Saxon processor. This improves the
> stylesheet process 2-3 times, but therefore I must write my own
> SaxonTransformer and I must patch some classes in cocoon. I've send
> these patches to the cocoon developers, but these patches are
> currently not in the official cocoon release.
>
> If you are interested in it, I could post it to the list.
> You are using the latest cocoon from the CVS?
>
> Regards
> Steffen...
>
> --
> ______________________________________________________________________
> Steffen Stundzig                            mailto:steffen@smb-tec.com
> SMB GmbH                                        http://www.smb-tec.com
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>


Re: PERFORMANCE PROBLEM!

Posted by Donald Ball <ba...@webslingerZ.com>.
On Thu, 25 Jan 2001, Steffen Stundzig wrote:

> I'm using cocoon 1.8.1 with the Saxon processor. This improves the
> stylesheet process 2-3 times, but therefore I must write my own
> SaxonTransformer and I must patch some classes in cocoon. I've send
> these patches to the cocoon developers, but these patches are
> currently not in the official cocoon release.
>
> If you are interested in it, I could post it to the list.
> You are using the latest cocoon from the CVS?

could you repost your patches? i don't recall seeing them, and i'd
certainly like to add this to cvs.

- donald


Re: PERFORMANCE PROBLEM!

Posted by Steffen Stundzig <st...@smb-tec.com>.
Hi Marco,

/**
 * @author: "Marco Spinetti" <m....@pisa.iol.it> 
 * @date: Thu, 25 Jan 2001 16:50:15 +0100
 */
> Hi all,
> my question is how I can increase my system performances. I have built a
multiterminal Xml portal based on Cocoon: in the service of meteo forecasts
for every request my system uses 1,6 second: using the Profiler.xml file I
found out that this time is so subdivided:
> 
> 36 ms (org-apache-cocoon-producer-ProducerFromFile)
> 408 ms (org.apache.cocoon.processor.xsp.XSPProcessor)
> 938 ms (org.apache.cocoon.processor.xslt.XSLTProcessor-1)
> 247 ms (org-apache-cocoon-formatter-HTMLFormatter)
> 54 ms (Outputting)
> 
> These data are terrible for a site that go in production: my boss has asked
me to increase the performances. How can I do? I use Cocoon 1.8, Jakarta
Tomcat Servlet Engine, the XSLT Xalan processor and the Xerces parser: using
XT do I improve the performances? 

I'm using cocoon 1.8.1 with the Saxon processor. This improves the
stylesheet process 2-3 times, but therefore I must write my own
SaxonTransformer and I must patch some classes in cocoon. I've send 
these patches to the cocoon developers, but these patches are 
currently not in the official cocoon release. 

If you are interested in it, I could post it to the list.
You are using the latest cocoon from the CVS?

Regards
	Steffen...

-- 
______________________________________________________________________
Steffen Stundzig                            mailto:steffen@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com




Re: PERFORMANCE PROBLEM!

Posted by Paul Russell <pa...@luminas.co.uk>.
* Marco Spinetti (m.spinetti@pisa.iol.it) wrote :
> 36 ms (org-apache-cocoon-producer-ProducerFromFile)
> 408 ms (org.apache.cocoon.processor.xsp.XSPProcessor)
> 938 ms (org.apache.cocoon.processor.xslt.XSLTProcessor-1)
> 247 ms (org-apache-cocoon-formatter-HTMLFormatter)
> 54 ms (Outputting)

Hmm. Doesn't look like it's caching. Have you enabled caching? It's
possible I've misunderstood the situation because I'm not very familiar
with C1 or the profiling file.

Paul.

-- 
Paul Russell                                 Email:   paul@luminas.co.uk
Technical Director                             Tel:  +44 (0)20 8553 6622
Luminas Internet Applications                  Fax:  +44 (0)870 28 47489
This is not an official statement or order.    Web:    www.luminas.co.uk

Re: PERFORMANCE PROBLEM!

Posted by Berin Loritsch <bl...@apache.org>.
Karsten Rolfs wrote:
> 
> Sounds like the problem I had.
> 
> XML/XSL is working fine with few datas, but when the XML file is big, it
> is really slow. To parse and process a XML file (size around 1-2 meg) it
> takes up to 30 seconds, so I am now using JSP (Tomcat) and SAX for XML
> parsing. The times for that are between <100 and 500 ms on a high
> traffic webserver.


Sounds like a candidate for Cocoon 2!

> 
> Karsten
> 
> karsten@rolfs.de
> 
> > Marco Spinetti wrote:
> >
> > Hi all,
> > my question is how I can increase my system performances. I have built
> > a multiterminal Xml portal based on Cocoon: in the service of meteo
> > forecasts for every request my system uses 1,6 second: using the
> > Profiler.xml file I found out that this time is so subdivided:
> >
> > 36 ms (org-apache-cocoon-producer-ProducerFromFile)
> > 408 ms (org.apache.cocoon.processor.xsp.XSPProcessor)
> > 938 ms (org.apache.cocoon.processor.xslt.XSLTProcessor-1)
> > 247 ms (org-apache-cocoon-formatter-HTMLFormatter)
> > 54 ms (Outputting)
> >
> > These data are terrible for a site that go in production: my boss has
> > asked me to increase the performances. How can I do? I use Cocoon 1.8,
> > Jakarta Tomcat Servlet Engine, the XSLT Xalan processor and the Xerces
> > parser: using XT do I improve the performances?
> > Please help me
> > Marco
> > m.spinetti@pisa.iol.it
> >
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>

Re: PERFORMANCE PROBLEM!

Posted by Karsten Rolfs <K....@t-online.de>.
Sounds like the problem I had. 

XML/XSL is working fine with few datas, but when the XML file is big, it
is really slow. To parse and process a XML file (size around 1-2 meg) it
takes up to 30 seconds, so I am now using JSP (Tomcat) and SAX for XML
parsing. The times for that are between <100 and 500 ms on a high
traffic webserver.


Karsten

karsten@rolfs.de

> Marco Spinetti wrote:
> 
> Hi all,
> my question is how I can increase my system performances. I have built
> a multiterminal Xml portal based on Cocoon: in the service of meteo
> forecasts for every request my system uses 1,6 second: using the
> Profiler.xml file I found out that this time is so subdivided:
> 
> 36 ms (org-apache-cocoon-producer-ProducerFromFile)
> 408 ms (org.apache.cocoon.processor.xsp.XSPProcessor)
> 938 ms (org.apache.cocoon.processor.xslt.XSLTProcessor-1)
> 247 ms (org-apache-cocoon-formatter-HTMLFormatter)
> 54 ms (Outputting)
> 
> These data are terrible for a site that go in production: my boss has
> asked me to increase the performances. How can I do? I use Cocoon 1.8,
> Jakarta Tomcat Servlet Engine, the XSLT Xalan processor and the Xerces
> parser: using XT do I improve the performances?
> Please help me
> Marco
> m.spinetti@pisa.iol.it
>

R: PERFORMANCE PROBLEM! (for Donald)

Posted by Marco Spinetti <m....@pisa.iol.it>.
Hi Donald,
excuse me but I think I have not understood. Do you advise me to implement a
HasChange method in my Xsp page and add my Xsl file the code you have sent
me?
But doing so I add a Xsp transformation to my Xsl file which there was
before not.
Very probably I have not understood: can you better explain it to me?
Regards
Marco
m.spinetti@pisa.iol.it

----- Original Message -----
From: Donald Ball <ba...@webslingerZ.com>
To: <co...@xml.apache.org>
Sent: Thursday, January 25, 2001 9:19 PM
Subject: Re: PERFORMANCE PROBLEM!


> On Thu, 25 Jan 2001, Marco Spinetti wrote:
>
> > Hi all, my question is how I can increase my system performances. I
> > have built a multiterminal Xml portal based on Cocoon: in the service
> > of meteo forecasts for every request my system uses 1,6 second: using
> > the Profiler.xml file I found out that this time is so subdivided:
> >
> > 36 ms (org-apache-cocoon-producer-ProducerFromFile)
> > 408 ms (org.apache.cocoon.processor.xsp.XSPProcessor)
> > 938 ms (org.apache.cocoon.processor.xslt.XSLTProcessor-1)
> > 247 ms (org-apache-cocoon-formatter-HTMLFormatter)
> > 54 ms (Outputting)
>
> you can eliminate almost all of this time by having your xsp pages
> implement a hasChanged method. i use this template in my main
> site-specific logicsheet to seamlessly add one to all of my xsp pages:
>
> <xsl:template match="xsp:page">
>   <xsl:copy>
>     <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
>   <xsp:logic>
>     static long last_changed_millis = 0;
>     static final long MILLISECONDS_TO_CACHE = 5*60*1000;
>
>     public boolean hasChanged(Object context) {
>       long current_millis = System.currentTimeMillis();
>       if (current_millis - MILLISECONDS_TO_CACHE &gt; last_changed_millis)
{
>         last_changed_millis = current_millis;
>         return true;
>       } else {
>         return false;
>       }
>     }
>   </xsp:logic>
>   </xsl:copy>
> </xsl:template>
>
> this causes xsp output to cache for a five minutes at a time. it gave me a
> speedup of over an order of magnitude.
>
> - donald
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>


Re: PERFORMANCE PROBLEM!

Posted by Donald Ball <ba...@webslingerZ.com>.
On Thu, 25 Jan 2001, Marco Spinetti wrote:

> Hi all, my question is how I can increase my system performances. I
> have built a multiterminal Xml portal based on Cocoon: in the service
> of meteo forecasts for every request my system uses 1,6 second: using
> the Profiler.xml file I found out that this time is so subdivided:
>
> 36 ms (org-apache-cocoon-producer-ProducerFromFile)
> 408 ms (org.apache.cocoon.processor.xsp.XSPProcessor)
> 938 ms (org.apache.cocoon.processor.xslt.XSLTProcessor-1)
> 247 ms (org-apache-cocoon-formatter-HTMLFormatter)
> 54 ms (Outputting)

you can eliminate almost all of this time by having your xsp pages
implement a hasChanged method. i use this template in my main
site-specific logicsheet to seamlessly add one to all of my xsp pages:

<xsl:template match="xsp:page">
  <xsl:copy>
    <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
  <xsp:logic>
    static long last_changed_millis = 0;
    static final long MILLISECONDS_TO_CACHE = 5*60*1000;

    public boolean hasChanged(Object context) {
      long current_millis = System.currentTimeMillis();
      if (current_millis - MILLISECONDS_TO_CACHE &gt; last_changed_millis) {
        last_changed_millis = current_millis;
        return true;
      } else {
        return false;
      }
    }
  </xsp:logic>
  </xsl:copy>
</xsl:template>

this causes xsp output to cache for a five minutes at a time. it gave me a
speedup of over an order of magnitude.

- donald