Hi,
I am using the Entity relationship example as a base. The database I am testing with is the microsoft adventureworks database which has 71 nodes and 92 links. Each node contains a Microsoft datagrid.
When loading a diagram model programmatically I get the following times:
At event ModelReplaced 14 sec.
At event LayoutLoaded 22 sec.
Total 36 sec.
Note - The LayoutLoaded event is not available in xaml.
Execute Method Diagram.LayoutDiagram 27 sec.
Does this performance seem reasonable???
I am setting the following programmatically:
LayeredDigraphLayout ldl = new LayeredDigraphLayout();
ldl.InitializeOption = LayeredDigraphInitIndices.DepthFirstIn;
ldl.LayerSpacing = 75.0;
ldl.SetsPortSpots = false;
myDiagram.Model.Modifiable = true;
myDiagram.Layout = ldl;
xaml:
go:Diagram
Grid.Row=“1” x:Name=“myDiagram”
InitialStretch=“Unstretched”
HorizontalContentAlignment=“Stretch”
HorizontalAlignment=“Left”
VerticalContentAlignment=“Stretch”
ModelReplaced=“myDiagram_ModelReplaced”
InitialLayoutCompleted=“myDiagram_InitialLayoutCompleted”
MouseLeftButtonDown=“myDiagram_MouseLeftButtonDown”
Loaded=“myDiagram_Loaded”
NodeTemplate="{StaticResource NodeTemplate}"
LinkTemplate="{StaticResource LinkTemplate}">
<go:Diagram.LayoutManager>
<go:LayoutManager Animated="True" DefaultLocation="0 0" />
</go:Diagram.LayoutManager>
<!-- this node implements a mode-less form that can be dragged around
and scrolls around to stay near the node it is detailing -->
<go:Node Id="myDetails">
<local:EntityForm go:Part.LayerName="Foreground" go:Part.Visible="False"
go:Part.Deletable="False" go:Part.Copyable="False" />
</go:Node>
<Control.Background>
<LinearGradientBrush StartPoint="0.0 0.0" EndPoint="1.0 0.0">
<LinearGradientBrush.GradientStops>
<GradientStop Color="White" Offset="0.0" />
<GradientStop Color="White" Offset="0.4" />
<GradientStop Color="White" Offset="1.0" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Control.Background>
</go:Diagram>