Profile Picture

diagram loading and layout performances

Posted By Marco Finizio 14 Years Ago
Author
Message
Marco Finizio
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 2, Visits: 1
Hi, i am using your evaluation version to understand if the nevron diagram API is suitable for displaying large amounts of graph data (nodes and connectors).

However, i see that it is REALLY slow in particular:

1) when adding the NNodes connectors to the view (example: View.Document.ActiveLayer.AddChild(connector)). On a dataset of 5600 1D connectors and 2000 2D nodes it takes more than 1,5 hour just to add all the elements!

2) when calling the Layout method on the NSymmetricalLayout (which is the best layout i have found for our purposes) it is also very slow and finally is unable to layout the graph.

Is there any hint to speedup the adding and layout phases? Should i use different methods or classes?

Thanks and greetings from Italy

Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 8:46 AM
Posts: 3,054, Visits: 4,012

Hi, Marco

Here are some advices on how you can speed up adding shapes to your diagram and layouting them:

 

1.       Disable the automatic generation of unique names for the active layer. It’s faster if you provide names to the shapes using their Name property.

 

document.ActiveLayer.AutoGenerateUniqueNames = false;

 

2.       Put the code that adds your shapes into a document BeginInit(), EndInit() block:

 

document.BeginInit();

 

   // Add your shapes here

 

document.EndInit();

 

3.       Regarding the layout – the symmetrical layout is a force directed layout, so you can use its MaxIterations and MaxTime (specified in milliseconds) properties to control how the amount of work and the time the layout is allowed to perform. Note that decreasing the maximum number of iterations (or time) will make the layout finish faster but the results may not be as good as if it was working longer.

 



Best Regards,
Nevron Support Team



Marco Finizio
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 2, Visits: 1
Thanks, i'll try the suggested points 1 and 3. The point 2 has been already used.

However, which is the fastest layout method for graphs? If the symmetricalLayout is slower than others, we could change it...

Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 8:46 AM
Posts: 3,054, Visits: 4,012
In general the deterministic graph layouts (such as the NLayeredGraphLayouts) are faster than force directed layouts. But at the end it all depends on the type of graph drawing that you want to generate and the nature of the graph...



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic