J.Pietschmann wrote:
John Austin wrote:

A high runner in FOP 0.20.5 is: PropertyList.findProperty().
It calls other functions in org.apache.fop.fo that consume
significant CPU resources. In one example it called itself
recursively to a (depth of 10)

Without taking a closer look at the code, I suspect it tries
to find inherited values. One approach to cope with this is
to resolve inherited and default values immediately during
FO construction. Because the full property set is stored,
in contrast to only specified properties now, only the
parent has to be looked up. This comes, of course at the
price of consuming more memory, and there are functions like
frome-nearest-specified-value() which require specified
properties to be marked. If someone can come up with a space
efficient storage, this may be a solution.

You could also look at the way alt.design tries for the best of both worlds. See fop.fo.FONode.java in the alt.design tree; notably makeSparsePropsSet()
BitSet specifiedProps
PropertyValue[] propertySet
PropertyValue[] sparsePropsSet
final int[] sparsePropsMap
final int[] sparseIndices

Peter B. West <http://www.powerup.com.au/~pbwest/resume.html

Reply via email to