Cool that you found such a radical speedup. :-) But
now the question is: how do I know if I have the same problem? Is this only for
RTMondrian? How do I fix it if I have it?
I think the problem is only with the force base layout, because this it is an iterative
layout made of small incremental step. And doing a translation of an element with a
composed shape then this is costly.
I think that only the force base layout had this problem.
The layout builder uses it now, so this is not related to Mondrian.
Alexandre
On Dec 7, 2015, at 23:10, Alexandre Bergel
<alexandre.bergel(a)me.com> wrote:
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
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev
---> Save our in-boxes!
http://emailcharter.org <---
Johan Fabry -
http://pleiad.cl/~jfabry
PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
_______________________________________________
Moose-dev mailing list
Moose-dev(a)list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.