Hello,

Line 21 does pretty much all the processing here so you are basically asking why FOP is so slow.
It isn't that slow when you consider how much work it has to do.


There are a *few* things you can look at to speed things up. Look through the documentation, mailing list archives, and FAQs for tuning and optimisation.

However it may be worth paying someone to help with the FOP redesign :-)

Other professional XSL:FO processors may be a bit faster in some circumstances....

Feel free to send me private email if you want to discuss this off list.

Alex McLintock


At 19:34 23/12/02, Lee, Insoo wrote:


>   Hello, not sure if this question is appropriate for this email list, but
> could somebody comment on following approach?
>
>   I'm generating XML on the fly from a servlet (line# 9 - using jdom,
> reading from database) and after reading static XSL (line#7), I use
> transformer to do XSL:FO translation (line#21).  However line#21 seems to
> be taking awfully long.... about 5 minutes for 1500 rows of records...
>   Is there anyway to improve the performance?  Thanks for your input in
> advance
>
>
> 1)    if( "pdf".equals( contentType ))
> 2)    {
> 3)                Driver driver = new Driver();
> 4)                driver.setOutputStream(response.getOutputStream());
> 5)                driver.setRenderer(Driver.RENDER_PDF);
> 6)                Transformer transformer=TransformerFactory.newInstance()
> 7)                    .newTransformer(new StreamSource(
> "http://myserver.com:8881/fd/xml/rates_pdf.xsl"; ));
> 8)
> 9)                 URL url = new URL(
> "http://myserver.com:8881/sp/xmlBuilder"; );
> 10)
> 11)                InputSource source = new InputSource(
> url.openStream());
> 12)                DOMParser parser = new DOMParser();
> 13)                parser.parse( source );
> 14)                Document doc = parser.getDocument();
> 15)                DOMSource inXML = new DOMSource( doc );
> 16)
> 17)
> 18)                System.out.println( "*************************** start
> timing.... for XML-XSL:FO translation" );
> 19)                long t1 = System.currentTimeMillis();
> 20)
> 21)                transformer.transform( inXML, new SAXResult(
> driver.getContentHandler()));
> 22)
> 23)                long t2 = System.currentTimeMillis();
> 24)                System.out.println( "*************************** time
> delta for XML-XSL:FO translation: " + ( t2 - t1 ) + " ms" );
> 25)   }
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Available for java/perl/C++/web development in London, UK or nearby. Apache FOP, Cocoon,
Turbine, Struts,XSL:FO, XML, Tomcat, First meeting free.http://www.OWAL.co.uk/



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to