-------- Original Message -------- Subject: Re: [Fwd: Re: Performance improvement in property consumption.] Date: Fri, 15 Oct 2004 18:30:39 +1000 From: Peter B. West <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
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.
Peter -- Peter B. West <http://cv.pbw.id.au/>