Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Link Performance (Read 2212 times)
38Mikes
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 8
Joined: Dec 8th, 2015
Link Performance
Feb 27th, 2017 at 2:18am
Print Post  
Having performance issues with the DiagramLink object.  My diagram has thousands of nodes.  I add all of the nodes (which are SvgNode) to the diagram first, and this happens reasonably fast, just a few seconds.  When I then add the links, about 1800 of them, it takes literally 20+ minutes.  I've identified the primary bottleneck to be the following line of code.

var link = diagram.Factory.CreateDiagramLink((DiagramNode)oNode, (DiagramNode)dNode);

This particular line, instantiation of the DiagramLink object, takes about 600ms.  Times thousands it gets pretty ridiculous.  How do I speed this up?  Thanks.
  
Back to top
 
IP Logged
 
38Mikes
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 8
Joined: Dec 8th, 2015
Re: Link Performance
Reply #1 - Feb 27th, 2017 at 2:30am
Print Post  
Note, I have also tried removing the diagram from the view, adding all the nodes + links, then adding back to the view, makes no difference at all.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Link Performance
Reply #2 - Feb 27th, 2017 at 8:33am
Print Post  
Try setting Diagram.ValidityChecks = false. If using links' AutoRoute property, also call the Suspend and Resume methods of Diagram.LinkRouter around the code that creates links.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint