Dragging Node with Many Links

Hello Walter,

Long time I’ve not write here, I guess it’s a good thing :)

We have come to a place in our application in which we have performance problem with GoXam.
We have diagram with about 50 nodes and about 200 links.
When we drag the nodes around the lag and it feels very bad.
Even when we drag a node with only 3 links the performance is bad.

What are the ways to try and make it better?

Thank you,
Ido

Take a look at the Performance Considerations section of the GoXamIntro.pdf document. There are a few suggestions there, such as simplifying your templates, avoiding use of overview window, and virtualization. Hopefully one of those suggestions will help, but I’m afraid I don’t have any single silver bullet for you.

I didn’t see Performance Considerations section in GoXamIntro.pdf (it is one of the few documents that is always on my desktop).
I do notice slow dragging of nodes regardless if they have many links (20) or very few (3).
I do notice that nodes without links are much faster to drag.


Virtualization is not really an option because we start for whole diagram display.
We can try to simplify our link DataTemplate although once the template is expanded it should not change very much if it composed of 5 or 15 elements.
I’ve turn off the overview window while doing the experiment.


Is it possible to use something like “shadow copy” of the nodes and links, to create the most simple node representation and most simple links just to make them follow the dragged node around to get the feedback of moving it?


WPF should be able to draw few rectangles, some text and few lines in lightspeed.


Thank you,
Ido

You’re quite right. 50 nodes and 200 links should be no problem for dragging performance in WPF.

Take a look at the Force Directed sample application. That sample allows you to specify how many nodes and links to randomly create. I’ve created 50 nodes, each with 1 to 10 links, and the dragging performance seems very quick. I’m assuming the performance will also be good when you run it in your environment. If so, it might be helpful to try to identify the differences between this sample and your application. I’d probably start by creating trivially simple templates for your nodes and links.

I’ve notice that the speed does not seem to be related to the number of links the node has.
I think it is caused by our code that run when moving the node.
I’ll check it and let you know.

Thank you,
Ido.

I fail to find the reason for the slowness.
Our custom layout and dragging tools don’t seem to affect it (I thought it will).
I’ve completely remove the overview and it didn’t change anything either.

I’ve try the Forced Directed sample it is exhibit similar behavior to what I’m see only it was much faster.
I’ve use this configuration:
MinLinks: 4
MaxLinks: 30
MinNodes:50
MaxNodes:200

Drag one of the center nodes you will see some “lag” during the drag

How can I debug such a problem?

Thank you,
Ido.

I’m running the ForceDirectedLayout sample with the same parameters, and I see no “lag” at all while dragging the root node very quickly.