You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Michael Zeldich <mi...@mercury.co.il> on 2001/09/12 16:17:43 UTC
Fop performance problem
I have some performance problems with FOP while running it on big
.fo files. I run the fop from a servlet and the input .fo file is bigger
then 6Mb. The problem is that after a number of pages in the result pdf file
is being created the render() function stacks for some undefined time (from
1 to 15 minutes !!! no CPU usage in this period of time). Can someone
explain me what should I do to solve the problem, if it's possible ?
I attach the exact code that uses fop in my servlet.
//==========================================================================
=======
public ByteArrayOutputStream xmlToPdf(CSessionContext
sessionContext, File foFile ) throws CTdException {
try {
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
Driver driver = new Driver();
driver.setRenderer(Driver.RENDER_PDF);
XMLReader parser =
XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
driver.setOutputStream(outStream);
driver.render(parser, new InputSource(new
FileInputStream(foFile)));
return outStream;
}
catch (Exception e) {
throw new CTdException("Failed to build report ",e);
}
}
//==========================================================================
=======
Thank you in advance
Michael Zeldich
Mercury Interactive Co.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org