On Jan 9, 2007, at 18:46, Andreas L Delmelle wrote:
On Jan 9, 2007, at 14:11, Manuel Mall wrote:
<snip />
What are the 81632 instances of class char[]? I assume this is the
text
in the table cells. But why are there more than twice as many as
there
are table cells?
Hehe, see my little remark about the TextLM... In its initialize()
method (I think, will check later), the FOText's char array is
copied (System.arraycopy()).
Sorry, my bad. Just realized that Richard's data indicates that the
layout stage hasn't even been reached at that point...? But that also
makes the picture somewhat more dramatic, because
That means there are currently two nearly identical char arrays
alive for each text node in the page sequence :(
this is till true, nonetheless, and that means that at layout stage
there will be twice as many (160000+ instances)
White-space nodes? Could also be an effect of the white-space
collapsing. Long shot, but theoretically, 'white-space-handling' in
FOText means 'replace FOText.ca with a copy minus a few characters',
if the originals weren't GC'ed at the time of the snapshot...
A possible next
step would be to reuse identical property lists. Especially in
documents with lots of identically formatted table cells this would
further reduce the memory footprint.
Property lists themselves are no longer alive in the snapshot, it
seems. I don't suppose they are that much of a problem. They are
meant to be in scope for only a very brief interval (best case: from
PropertyListMaker.make() until FObj.bind())
Except for the child-parent relation, there are virtually no strong
references to PropertyLists. One in the MainFOHandler(), to pass down
as a parentPropertyList to the others.
Notable exceptions are
- a table-column's PropertyList: could be needed to resolve calls to
from-table-column()
- a retrieve-marker's PropertyList: is needed for deferred resolution
of the marker properties
Possible improvement would be a subtype that collapses the tree of
PropertyLists at a given point. Right now, every PropertyList holds a
reference to its parent, and with that, to the whole ancestry...
Cheers,
Andreas