You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Matthew Langham <ml...@s-und-n.de> on 2002/07/09 13:48:13 UTC

FOP performance

Hi,

we have a project where we are using Cocoon 2.0. We have a simple pipeline
that generates a PDF document:

      <map:match pattern="print/pdfxyz">
        <map:generate type="webprintParameterPrint"/>
        <map:transform type="webprintXYZ"/>
        <map:transform src="webprint/contexts/XYZ/fragment.xsl"/>
        <map:serialize type="fo2pdf"/>
      </map:match>

The XML data arrives as a request paramter (130 KB in size!) and the
stylesheet is 636 KB in size. We are using our own specific generator and
transformer in the pipeline (but they don't do anything special).

It takes 8.5 seconds to generate the PDF file - which is only 1 page! Quite
complex though with lots of tables etc - but no graphics. The system is a
650 Mhz with 256 MB RAM. Our customer thinks that this is too slow - and I
am looking for any ideas as to how we can improve the speed (or perhaps this
is normal?). The duration is split evently between the transformation step
and the FOP step.

Would switching to 2.1-dev help? Why?
The stylesheet is very large - any idea here (translets?)
Perhaps it's quicker to use several stylesheets instead of 1 large one?
Is there a different PDF rendering engine we can use with Cocoon?
etc.

Thanks.

Matthew

--
Open Source Group       Cocoon { Consulting, Training, Projects }
=================================================================
Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
Tel:+49-5251-1581-30  mlangham@s-und-n.de - http://www.s-und-n.de
-----------------------------------------------------------------
Cocoon book:
  http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20
=================================================================



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


Re: FOP performance

Posted by Eric Dalquist <eb...@mtu.edu>.
I haven't used FOP with cocoon yet but I have with Oracle's XSQL server
pages. FOP is a very useful package but it is slow ESPECIALLY with tables. I
haven't looked to heavily into the status of the project for about a year
now but performance was a big issue with the dev team but changes weren't
happening too fast. I would read through their users list and see if you can
get some people to help you optimize your layout a little bit. There are
certain things that can be done other ways to save time.

-Eric Dalquist

----- Original Message -----
From: "Matthew Langham" <ml...@s-und-n.de>
To: "Cocoon-Dev@Xml. Apache. Org" <co...@xml.apache.org>;
"Cocoon-Users@Xml. Apache. Org" <co...@xml.apache.org>
Sent: Tuesday, July 09, 2002 7:48 AM
Subject: FOP performance


> Hi,
>
> we have a project where we are using Cocoon 2.0. We have a simple pipeline
> that generates a PDF document:
>
>       <map:match pattern="print/pdfxyz">
>         <map:generate type="webprintParameterPrint"/>
>         <map:transform type="webprintXYZ"/>
>         <map:transform src="webprint/contexts/XYZ/fragment.xsl"/>
>         <map:serialize type="fo2pdf"/>
>       </map:match>
>
> The XML data arrives as a request paramter (130 KB in size!) and the
> stylesheet is 636 KB in size. We are using our own specific generator and
> transformer in the pipeline (but they don't do anything special).
>
> It takes 8.5 seconds to generate the PDF file - which is only 1 page!
Quite
> complex though with lots of tables etc - but no graphics. The system is a
> 650 Mhz with 256 MB RAM. Our customer thinks that this is too slow - and I
> am looking for any ideas as to how we can improve the speed (or perhaps
this
> is normal?). The duration is split evently between the transformation step
> and the FOP step.
>
> Would switching to 2.1-dev help? Why?
> The stylesheet is very large - any idea here (translets?)
> Perhaps it's quicker to use several stylesheets instead of 1 large one?
> Is there a different PDF rendering engine we can use with Cocoon?
> etc.
>
> Thanks.
>
> Matthew
>
> --
> Open Source Group       Cocoon { Consulting, Training, Projects }
> =================================================================
> Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> Tel:+49-5251-1581-30 mlangham@s-und-n.de - http://www.s-und-n.de
> -----------------------------------------------------------------
> Cocoon book:
>   http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20
> =================================================================
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: FOP performance

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
On Tuesday 09 July 2002 13:48, Matthew Langham wrote:
>. . .
> It takes 8.5 seconds to generate the PDF file - which is only 1 page! 
>. . .

AFAIK the XSL-FO constructs that you use make a lot of difference regarding 
the performance of FOP - I have no hard facts in mind (you might want to 
search the FOP mailing lists archive) but IIRC using lots of tables vs. 
simple blocks makes a big difference.

-Bertrand

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


RE: FOP performance

Posted by Berin Loritsch <bl...@apache.org>.
> From: Matthew Langham [mailto:mlangham@s-und-n.de] 
> 
> Hi,
> 
> It takes 8.5 seconds to generate the PDF file - which is only 
> 1 page! Quite complex though with lots of tables etc - but no 
> graphics. The system is a 650 Mhz with 256 MB RAM. Our 
> customer thinks that this is too slow - and I am looking for 
> any ideas as to how we can improve the speed (or perhaps this 
> is normal?). The duration is split evently between the 
> transformation step and the FOP step.

Each version of FOP and Cocoon gets quicker and quicker.  It's
better stay current.

Regarding your questions on speeding up the implementation, I have
to ask how often the source changes.  If it does not change often,
I suggest pre-generating it on a specified interval. The user will
think you did some voodoo and think you are a "god", and you didn't
change the architecture.

At the very least, this will buy you some time so that you can
experiment.


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>