RTEdgeBuilder very strange behavior

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RTEdgeBuilder very strange behavior

Peter Uhnak
Hi Alex,

I've encountered a very strange behavior and I cannot tell what is going on.

This is old RTEdge build*

~~~~~~~~~~~~~~~~~~~~~
| v es |
v := RTView new.

es := RTBox elementsOn: (1 to: 10).
v addAll: es.
es @ RTDraggable.

RTEdge buildEdgesFromObjects: (1 to: 10) from: #yourself toAll:  [:value | (Array with: value -1  with: value + 1 with: value + 2) ] inView: v.

RTForceBasedLayout on: es.
v addAnimation: (RTSpringLayoutStepping new view: v).

v @ RTDraggableView.

^ v
~~~~~~~~~~~~~~~~~~~~~~~~

the layouting is almost instant,

however if I use RTEdgeBuilder suddenly it is very slow

~~~~~~~~~~~~~~~~~~~~~~~~
| v es |
v := RTView new.

es := RTBox elementsOn: (1 to: 10).
v addAll: es.
es @ RTDraggable.

RTEdgeBuilder new
view: v;
elements: es;
connectToAll: [:value | (Array with: value -1  with: value + 1 with: value + 2) ].

RTForceBasedLayout on: es.
v addAnimation: (RTSpringLayoutStepping new view: v).

v @ RTDraggableView.

^ v
~~~~~~~~~~~~~~~~~~~~~~~~~~

the view still has the same number of elements and edges and the output looks identical, but with EdgeBuilder is it very slow.

Profiler is showing me that with EdgeBuilder it spends a lot of time in attach points and with moving edges, which is strange.

In either case it has no right to be so slow with 10 elements and 26 edges...

Can you reproduce this behavior?

Thanks,
Peter

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: RTEdgeBuilder very strange behavior

abergel
I know why. The reasons is that I have introduced the shortest attach point as the default attach point. The problem is that this shortest attach point is much slower to execute. 

This is now fixed.

Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Aug 3, 2015, at 1:04 PM, Peter Uhnák <[hidden email]> wrote:

Hi Alex,

I've encountered a very strange behavior and I cannot tell what is going on.

This is old RTEdge build*

~~~~~~~~~~~~~~~~~~~~~
| v es |
v := RTView new.

es := RTBox elementsOn: (1 to: 10).
v addAll: es.
es @ RTDraggable.

RTEdge buildEdgesFromObjects: (1 to: 10) from: #yourself toAll:  [:value | (Array with: value -1  with: value + 1 with: value + 2) ] inView: v.

RTForceBasedLayout on: es.
v addAnimation: (RTSpringLayoutStepping new view: v).

v @ RTDraggableView.

^ v
~~~~~~~~~~~~~~~~~~~~~~~~

the layouting is almost instant,

however if I use RTEdgeBuilder suddenly it is very slow

~~~~~~~~~~~~~~~~~~~~~~~~
| v es |
v := RTView new.

es := RTBox elementsOn: (1 to: 10).
v addAll: es.
es @ RTDraggable.

RTEdgeBuilder new
view: v;
elements: es;
connectToAll: [:value | (Array with: value -1  with: value + 1 with: value + 2) ].

RTForceBasedLayout on: es.
v addAnimation: (RTSpringLayoutStepping new view: v).

v @ RTDraggableView.

^ v
~~~~~~~~~~~~~~~~~~~~~~~~~~

the view still has the same number of elements and edges and the output looks identical, but with EdgeBuilder is it very slow.

Profiler is showing me that with EdgeBuilder it spends a lot of time in attach points and with moving edges, which is strange.

In either case it has no right to be so slow with 10 elements and 26 edges...

Can you reproduce this behavior?

Thanks,
Peter
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev