Hi!
I have found a nasty situation that may occurs when using composite shapes.
Consider the following script:
[ b := RTMondrian new.
b shape box size: 30; color: Color red trans; withText.
b nodes: (1 to: 20).
b edges connectFrom: [ :v | v // 3 ].
b build.
RTForceBasedLayout new
"doNotUseProgressBar;"
on: b view elements.
b view] timeToRun
=> 0:00:00:10.386
[ b := RTMondrian new.
b shape box size: 30; color: Color red trans; withText.
b nodes: (1 to: 20).
b edges connectFrom: [ :v | v // 3 ].
b build.
RTOptimizedForceBasedLayout new
"doNotUseProgressBar;"
on: b view elements.
b view] timeToRun
0:00:00:00.387
Yes, on this example, the class RTOptimizedForceBasedLayout is 33 faster than the
traditional layout.
The problem is that translating a composite shape is much slower than translating a
non-composite shape. I have created mock elements and mock edges. That is a good news :-)
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.