Begin forwarded message:

Hi people,

From: Jeremias Maerki <[EMAIL PROTECTED]>

Interesting: a simple FO wrapper around a big preformatted text file.
<snip />
Still, it's a little scary when 0.20.5 processes this file in one second while 0.93 allocates 500MB+ memory for a 250KB file and eventually dies
the OutOfMemory death. It's a very special example you have here.

Note that, even when you trim it down to only the first page- sequence, 512MB of heap is not enough for 0.93/Trunk

Since I was a bit intrigued by this example, I did a quick debug session to try to establish the location of the drain. Started off by placing a sole breakpoint in PageSequenceLayoutManager.activateLayout(), and it seems 0.93 has no problem constructing the FO tree... as I expected, since the structure is very simple. There are four FOText instances per page-sequence, as the text-blocks get split up into chunks of Short.MAX_VALUE characters at most (~ (3 x 32K) + 29K). The reason being that the TextLM uses shorts as indices for the AreaInfos, and thus can't handle larger text-blocks.

This corresponds to four Paragraphs in the LineLayoutManager. The initial element list construction for the Paragraphs isn't a problem either. It is only when going further, createLineBreaks()- >findOptimalBreakingPoints(), that the trouble starts...

In this case, it seems to be a logical consequence of the total-fit line-breaking algorithm. Peculiar example because here total-fit on block-level means the same as total-fit on page-sequence-level.

So, I also tried manually inserting fo:blocks around each scene in the example, but then bumped into an Exception:

Feb 28, 2007 11:33:55 PM getNextSimplePageMaster WARNING: subsequences exhausted in page-sequence-master 'chapter', using previous subsequence
Feb 28, 2007 11:33:55 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
java.lang.IllegalStateException: subsequences exhausted in page- sequence-master 'chapter', cannot recover at org.apache.fop.cli.InputHandler.transformTo ( at org.apache.fop.cli.InputHandler.renderTo (
        at org.apache.fop.cli.Main.startFOP(
        at org.apache.fop.cli.Main.main(

The investigation continues...



Reply via email to