Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic System.OutOfMemoryException thrown when calling LayeredLayout.Arrange() on a diagram with 135 nodes (Read 2990 times)
Paul
YaBB Newbies
*
Offline



Posts: 17
Joined: Jan 8th, 2013
System.OutOfMemoryException thrown when calling LayeredLayout.Arrange() on a diagram with 135 nodes
Jun 18th, 2013 at 9:32pm
Print Post  
I two versions of a diagram. The earlier version has 94 nodes and LayeredLayout.Arrange() finishes in about 4 minutes. The later version has 135 nodes and causes this exception to be thrown when LayeredLayout.Arrange() is called:

System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

Is there anything I can do get LayeredLayout.Arrange() to finish faster and not throw exceptions?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: System.OutOfMemoryException thrown when calling LayeredLayout.Arrange() on a diagram with 135 nodes
Reply #1 - Jun 19th, 2013 at 7:37am
Print Post  
It will work much faster if you set the layout's StartNode and EndNode properties, or enable EnforceLinkFlow. Otherwise the algorithm tries to find the longest path in the graph and build layers along it, and that might be time and memory consuming in large graphs.

Even if running path-finding, you can still limit how much time LayeredLayout will look for long paths by setting the TimeLimit property. That should indirectly limit how much memory is required too.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Paul
YaBB Newbies
*
Offline



Posts: 17
Joined: Jan 8th, 2013
Re: System.OutOfMemoryException thrown when calling LayeredLayout.Arrange() on a diagram with 135 nodes
Reply #2 - Jun 19th, 2013 at 4:06pm
Print Post  
Do you know what release added the StartNode, EndNode, and EnforceLinkFlow properties. We are using 5.0.1.29913 and I don't see any of them in the LayeredLayout class.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: System.OutOfMemoryException thrown when calling LayeredLayout.Arrange() on a diagram with 135 nodes
Reply #3 - Jun 19th, 2013 at 6:07pm
Print Post  
http://www.mindfusion.eu/onlinehelp/flowchartnet/index.htm?What_s_New_in_this_Re...

EnforceLinkFlow      : v5.3.3
StartNode/EndNode : v5.7

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Paul
YaBB Newbies
*
Offline



Posts: 17
Joined: Jan 8th, 2013
Re: System.OutOfMemoryException thrown when calling LayeredLayout.Arrange() on a diagram with 135 nodes
Reply #4 - Jun 25th, 2013 at 5:27pm
Print Post  
We upgraded to 6.0.3 and it resolved all of the issues we were seeing with long layout times. Thanks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint