On 04 Jun 2009, at 15:36, Laera Dario wrote:

Hi Dario

I once ran a test with a document
containing one single fo:block with the pre-formatted text of an
entire book. Without 'linefeed-treatment="preserve"', FOP needed at
least 768MB to avoid running out of memory, because it had to
recompute all the line-breaks. Preserving the linefeeds, I needed only
64MB (maybe even lower, but I don't think I tried that).

Andreas, this recalls me an old thread: http://markmail.org/thread/j3zg47pfwjjn3y6v . Maybe the adjustment ratio have some responsibility on the high memory consumption.

Some, yes, but not all. It was a simple one-column layout, so the default size for a space should be roughly OK in relation to the line- length. The fact remains that FOP has to recompute and reconsider all of the break-possibilities between every word, while using forced line-breaks automatically generates -INFINITE penalties, so the algorithm has no choice but to consider those breaks as definitive. A similar logic holds for page-sequences, I think. If you use huge amounts of tiny fo:blocks without forced page-breaks, line-breaking will not require that much memory, but page-breaking will...


Regards

Andreas

Reply via email to