Hi John,
thanks for reply. Could you give me a hint - what version of fop are you
using and the code pattern of the usage. I use very simple approach:
ByteArrayOutputStream out = new ByteArrayOutputStream();
Driver driver = new Driver();
driver.setRenderer(RENDER_PDF);
driver.setInputSource(foSrc); // defined previously
driver.setOutputStream(out);
driver.run();
// save
FileOutputStream objF = new FileOutputStream(pstrFile);
out.writeTo(objF);
objF.close();
out.close();
This approach locks some memory even if I call gc() and exit the function.
thanks
Zdenek
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 12, 2001 8:44 PM
To: [EMAIL PROTECTED]
Subject: Re: reuse of PDFRenderer
I don't have a solution, but I also would like to reuse or reset the
driver. I remember seeing that reset had problems, any fixes or a way to
make it work? I'm generating 70,000 pdf's with pretty complex fo markup
and would like to speed up the process anyway possible. I have no memory
problems (avg pdf is less than 10 pages), I would just like to speed up the
rendering by reusing the driver.
JohnPT
fop-dev-return-12113-jthaemlitz=oreillyauto.com@XML.
APACHE.ORG
To: "'[EMAIL PROTECTED]'"
<[EMAIL PROTECTED]>
12/12/01 09:31 AM
cc: Dvor�k Zdenek <[EMAIL PROTECTED]>
Please respond to fop-dev
Subject: reuse of PDFRenderer
Hi,
this is my first time contacting the mail group. If you received this mail
in error, I am sorry.
I am building a batch printing application. This application processes huge
number of documents.
I did some measurements and found out that every document beeing processed
(Driver.run()) locks about 6 kB of memory. I invastigated the problem and
did a pool of Driver objects to reuse them. This doesn't help since the
Driver object by starting the setRenderer() method instantiates a
PDFRenderer and this is the object that after beeing finished still keeps
allocated memory. If I reset() the driver to perform another
transformation
it creates a corrupted PDF since the renderer was not reinitialized (my
opinion).
Does anyone have an idea how to make a pool of Driver, PDFRenderer objects
or how to get rid of the memory leak?
thanks Zdenek
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]