Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Performance Issue (Read 1841 times)
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Performance Issue
Jan 29th, 2010 at 4:03pm
Print Post  
Hi Stoyan,

In our diagram we have added 2048 ShapeNodes in two columns(1024 nodes in each column).

While rendering, it is taking approx 12-15 sec to render all the nodes on the diagram.

Please suggest us the appropriate solution to overcome this performance issue.

Regards,
Anshul
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Performance Issue
Reply #1 - Jan 29th, 2010 at 4:54pm
Print Post  
Hi,

This takes about two seconds on my system -

diagram.UndoManager.UndoEnabled = false;
diagram.AutoResize = AutoResize.None;
diagram.SelectAfterCreate = false;

diagram.BeginInit();
for (int i = 0; i < 1024; ++i)
{
     var node1 = new ShapeNode();
     node1.Bounds = new Rect(0, i * 40, 30, 30);
     diagram.Nodes.Add(node1);

     var node2 = new ShapeNode();
     node2.Bounds = new Rect(60, i * 40, 30, 30);
     diagram.Nodes.Add(node2);
}
diagram.EndInit();

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Performance Issue
Reply #2 - Jan 31st, 2010 at 1:10pm
Print Post  
Hi Stoyan,

1). we are creating nodes by this way

Code
Select All
ShapeNode mainNode = new ShapeNode(diagram); 



and after this, we are attaching subordinate nodes by this way

Code
Select All
labelNode = diagram.Factory.CreateShapeNode(
			     mainNode.Bounds.X + mainNode.Bounds.Width + 10, mainNode.Bounds.Y - 8 + (mainNode.Bounds.Height / 2),
			     500, 20); 



Now suggest where we need correction to improve the performance.

2). When we have 1024 nodes in a single row, they are partially overlapping each other but if decrease the count to 200-300 then they have some finite distance. How to overcome this?

3). Can we apply virtualization? If yes, how can we apply?

Regards,
Anshul
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Performance Issue
Reply #3 - Feb 1st, 2010 at 9:00am
Print Post  
Hi,

1. Are there 1024 groups like this, or 2048?

2. What code are you using to arrange the row?

3. There's no built-in virtualization support. If all nodes are in a row or a column, you could create only a few of them, do not use a scrollviewer but add a separate scrollbar that only changes the nodes content and updates the visible links to represent a different range of the graph.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint