Peter B. West wrote:

Finn Bock wrote:


Alt-design just uses a sparse array, constructed at END_ELEMENT.  Space
savings are progressively realized as the depth of the FO Tree reduces.
 Maximum consumption occurs at the points of greatest depth of the
tree, minima at the end of each page-sequence.

IIRC your sparse array does not just contain the relevant properties for an element (those listed in the spec under each fo:element), but the joined set of all properties relevant for all the allowed children. If this is correct, the sparse arrays stores more properties and uses more memory than my proposal does.

The reason that the sparse arrays are constructed on the way back up the
tree (at END_ELEMENT) is that the properties on all of the children have
been resolved (except for markers and unresolved expressions), so there
is no need to maintain any values that will not be used on *this* node.
 This, I imagine, is the same justification as for your reductions.

Which is to say; no, the sparse arrays contain only properties relevant to the node itself. If not, it's a bug.


Reply via email to