xsl-list
[Top] [All Lists]

[xsl] Performance issue XSL:FO

2007-03-09 14:46:04
Hi,

I'm generating a PDF on the fly from my servlet. I use transformer to
do XSL:FO translation:

1> StringReader xmlStream = new StringReader(xmlWriter.toString());
2> Source src = new StreamSource(xmlStream); 
3> Result res = new SAXResult(fop.getDefaultHandler());
4> transformer.transform(src, res);

However line#4 seems to be taking a lot of time to execute (around 40
seconds).

When I run it using the FOP command line (with the same XML content),
for instance:

fop -xml myXml.xml -xsl myXsl.xsl -pdf outPDF.pdf

It takes only about 3 seconds.

- Can anybody tell me why it takes so much longer from my servlet?
- Is there a way to improve the performance when run it from my
servlet?

By the way, I use FOP version 0.93.


Thanks for your help.
Thomas



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>