Currently, every time an Envelope is queried it has to do O(n) work (where n is the number of primitives) since it has to evaluate a tree of n-1 applications of max. Envelopes ought to be memoized to cut down on the asymptotic time needed to e.g. lay out a list of diagrams using cat.
Currently, every time an Envelope is queried it has to do O(n) work (where n is the number of primitives) since it has to evaluate a tree of n-1 applications of
max
. Envelopes ought to be memoized to cut down on the asymptotic time needed to e.g. lay out a list of diagrams using cat.