Indeed, this caching should happen for all properties
and for all shapes (both for nodes and for edges). I think that Alex stopped in the middle
because he did not know whether this caching had an effect or not.
I was wondering whether it would make sense to do this for all the metrics. Apparently
yes, I then continued. All shape parameters should be cached.
Alex, could you take a look at that?
Done. Mondrian-Alexandre_Bergel.470
The next question is that if the border color is
called all the time, what is the use of the bitmap cache?
The bitmap is for not having to display inner nodes. Recursion takes times.
> ======
> |view o |
> view := MOViewRenderer new.
> o := OrderedCollection new: 100.
> 1 to: 100 do:[:i | o add: i].
> (view shape: (MORectangleShape new
> width: [:e | 200];
> height: 200;
> withBorder;
> borderColor: [:e | (Delay forMilliseconds: 50) wait. Color gray])).
> view nodes: o.
> view layout: (MOGridLayout new gapSize: 1).
> view open
> ======
A better version could be
-=-=-=-=-=-=-=-=-=-=-=-=
|view o a |
a := {0}.
view := MOViewRenderer new.
o := OrderedCollection new: 100.
1 to: 100 do:[:i | o add: i].
(view shape: (MORectangleShape new
width: [:e | 200];
height: 200;
withBorder;
borderColor: [:e | a at: 1 put: (a first + 1). Color gray])).
view nodes: o.
view layout: (MOGridLayout new gapSize: 1).
view open.
a
-=-=-=-=-=-=-=-=-=-=-=-=
Just inspect the expression, and see if the array a changes over the time.
Is there any remaining problem left in Mondrian related to the speed issue?
Cheers,
Alexandre