Performance hit with large number of Dynamic ports

Our application is loosely based on the dynamic ports sample. Each node is much large containing 20 to 30 ports on each side of the node and the port name is also displayed. The diagram panel scale is linked to a slider through which zoom can be done from 10% to 500%.

On the whole there may be from 100 to 200 nodes.

Each node may look similar to the picture below.


  1. After construction of graph model, the assignment to the diagram (drawing of the diagram) takes anywhere between 10 to 15 seconds.
  2. Zooming seems to be dead slow in lower scales.
  3. Panning is jittery in lower scales.

which makes this unusable in case of 100 to 200 node cases.

Is there any solution to speed up this?

Is this Silverlight or WPF?

I just tried the Dynamic Ports sample in GoWpfDemo with 320 nodes where most of the nodes had 50 ports each. Scrolling and zooming in or out is fast and smooth.

When there is no text, the performance seems good.

if i just modify the data template to display a string “port name” adjacent to left and right port rectangles (as shown in the screen shot), then the performance starts to degrade…

Is there some way out.?

GoXam does not do any more work when scrolling or zooming depending on whether or not there is any text. My guess is that this is purely a WPF performance issue, although this particular one seems surprising to me. Do you have the same behavior on machines with good graphics cards as well as one ones without?