On 09/10/2010 01:55 AM, Hamed Mohammed wrote:
Hi,
Attached word file includes snap shots of exeption and heap dump analysis.

Just a tip for the future: screenshots* are much less useful than text. Please copy and paste the text of the exception rather than taking screenshots and pasting the screenshots. You should find that your profiling tool lets you select the exception text and copy it. Once you've done that, open Notepad (since you're on Windows) and paste the text in there. Or just use the pastebin website link I sent you.

The easier you can make it for people to help you, the more effort they'll put in and the more likely they'll be to try.

In this case, your memory profiling shows that fop is using lots of memory - but that's pretty meaningless without knowing what you're feeding to it. Can you supply the XSL-FO document involved? Or a suitable test-case? If you save the XSL-FO to a plain text file and run fop on it standalone, does it use the same amount of memory?

It's not necessarily surprising that the FlowLayoutManager is using lots of memory if it's processing a really huge or complex XSL-FO document. Seeing the input is necessary to be able to help you.

You also didn't answer the rest of the questions. I quote my earlier mail:

What's PdfStorage? It doesn't seem to be in fop's packages...

Any chance you can post a self-contained test program that demonstrates
the problem you describe, along with sample input for it?

String xml = builder.getReport(); /// gets the XSL:FO file data approx 50mb
If you're concerned about memory consumption, writing your XSL-FO to a
tempfile rather than an in-memory string and passing that to FOP's SAX
engine would be a big help. Or, for that matter, writing directly to the
SAX handler's InputStream, progressively generating the document as it's
required so it never has to exist entirely in memory or on disk.


* Why? If you supply a screenshot image, it can't be searched easily and is generally annoying to use. It's made even more so by having it inside a Microsoft Word document - not everyone uses Microsoft Word and besides its an irritating format to work with. In this case, confusingly, it looks like the exception trace might be composed of two different exceptions or omit some content in the middle, which isn't helpful. Also, Google can't index screenshots so others won't be able to able to find your question and any answers to it as easily when looking for help for the same problem later.

--
Craig Ringer

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to