Actually, the I didn't realize that the implementation of this cache changed with r754379. The previous implementation used an internal PreferredSizeCache "struct", which was self-documenting :)
On Thu, Apr 9, 2009 at 11:20 AM, Noel Grandin <[email protected]> wrote: > Todd Volkert wrote: >> I'll add that due to the nature of layout, a component might be asked >> for its preferred size N times in one event loop as each component in >> its ancestry lays itself out, so caching it especially optimizes this >> case. In my tests, caching this reduced layout time by almost two >> orders of magnitude (from ~100ms to ~1ms). >> > It might be handy to document things like this in the code - it's not at > all obvious from a cursory examination, and will get future generations > of Pivot coders up to speed much faster. > >
