Version

Optimizing xamDiagram for Handling Large Data

Optimizing xamDiagram for Handing Large Data

Introduction

This topic provides guidance about tuning the xamDiagram™ control for large data handling.

The xamDiagram is capable of handling large amounts of data; however, performance issues may still arise. If you are experiencing performance issues, consider trying some of the following suggestions in order to improve performance.

Note
Note:

This is not normally necessary and applying too many of the suggestions listed below could diminish the overall usability of the diagram. Therefore, these are to be carefully considered and practically tested first in order to find out which combination produces the best results.

xamDiagram performance optimization suggestions reference chart

The following table summarizes the possible configurations related to optimizing the xamDiagram ’s performance.

Optimization Aspect Description

Layout

Using the Layout property of the xamDiagram causes an additional iteration over all the nodes. If the Layout applied performs heavy calculations this would additionally impact performance. If that is the case, where possible, consider setting the DiagramNode.Position property to a pre-calculated position.

Number of visible items

Try to limit the number of items visible at one time, for example, increase the MinimumZoomLevel.

Navigation pane

Displaying the navigation pane involves some additional overhead for displaying the items in it; consider setting the NavigationPaneVisibility to Collapsed.

Selection

If there is latency in item interactions, consider setting the SelectionMode to Single or None in order to prevent interactions with large numbers of items.

Items templates

In order to reduce the rendering time, use lighter `DataTemplate`s for the DiagramItem.DisplayTemplate. The data templates should contain as few elements and bindings as possible.

Nodes shape

Use the DiagramNode.Geometry property as opposed to the DiagramNode.DisplayTemplate for creating custom node shapes.

Connection type

Connections with DiagramConnection.ConnectionType set to Straight perform better than the ones with RightAngle.

Connection caps

Custom caps set through the DiagramConnection.StartCapStyle and EndCapStyle properties attach a new control in the visual tree for each cap. For data intensive applications, consider using one of the predefined cap types through the DiagramConnection.StartCapType and EndCapType. If possible do not use caps at all by setting the cap type to None.

Connections start/end points

Consider setting the DiagramConnection.StartNodeConnectionPointName and EndNodeConnectionPointName properties in order to associate a connection’s ends with a specific point on its target nodes, skipping the routine of determining the closest connect point.