diagrams / diagrams-core

Core types and utilities
https://diagrams.github.io/
Other
93 stars 43 forks source link

Add memoization to Envelopes #27

Open byorgey opened 12 years ago

byorgey commented 12 years ago

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.

bergey commented 10 years ago

@Mathnerd314 If you want to tackle this, take a look at how Transformation is memoized using MemoTrie.