I’m trying to programmatically build a heirarchical graph of around 6000 nodes and add them to a diagram which is then layed out using GoLayoutLayeredDigraph. The node and link adding code looks something like this:
public void tree_parse( geom_node node, GoBoxNode parent )
{
foreach ( geom_node each in node.Children )
{
GoBoxNode n = new GoBoxNode();
n.UserObject = each;
each.Tag = n;
n.Text = each.Title;
goView1.Document.Add( n );
GoLink l = new Go.GoLink();
l.FromPort = parent.Port;
l.ToPort = n.Port;
goView1.Document.Add( l );
tree_parse( each, n );
}
}
For about 6200 nodes it took about an hour and twenty minutes. Am I missing something obvious, or is this an average amount of time for it to take?