We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Diagram Performance

Thread ID:

Created:

Updated:

Platform:

Replies:

78977 Jan 14,2009 11:18 PM UTC Sep 6,2011 05:36 PM UTC WinForms 13
loading
Tags: Diagram
Richard Deverson
Asked On January 14, 2009 11:18 PM UTC

Hello,
We are evaluating the latest Syncfusion diagram component, and I would very much appreciate some comments about performance.
Our diagram will essentially display a computer network. There could be several hundreds of Nodes (e.g. computers, switches, routers etc.).
Every node will have at least one connection to another node, e.g. computers connected to switches.
We would probably like to use the layers feature, e.g. to show different subnetworks on different layers.
We would create the diagram dynamically, from our own object model.
The diagram needs to be fast, e.g. a diagram with hundreds (but not thousands) of nodes must load in 1-2 seconds.
Adding, moving or deleting a node must be "instantaneous".
We would like to use the data-binding functionality of the Syncfusion Diagram. I.e. we would like our diagram to update automatically when our object model changes (e.g. if the object model is updated from another "client", we want to see the changes immediately in the diagram).
What kind of performance can we expect from the Syncfusion Diagram component?
Are there any samples that specifically address performance? E.g. a big diagram sample with data-binding to a large object model (or dataset or similar)?

Regards
Richard



Richard Deverson
Replied On January 16, 2009 08:05 AM UTC

Further to the above.
I have done some testing with the Diagram Builder sample, and using the NetworkFlowModel.edp symbol palette.
In runtime I created approximately 400 "Workstations" using the NetworkFlowModel "Workstation" symbol model. I also created approximately 50 nodes using a "switch" symbol model I designed myself. The switch symbol model consists of a bitmap image with 16 ports.
I also set the Model.SizeToContent property to true, in order that the nodes could be appended to the model.
The results are:
1. The diagram takes a long time to load (approx. 60 seconds).
2. When the diagram is loaded, it is generally unresponsive. Zooming and panning with the overview control is very slow. Scrolling in the diagram window is also very slow. Moving nodes around is not too bad, but there is a noticable "lag" in response.
Does anybody have any tips or comments?
E.g.
Would using multiple views on the same model help?
Note:
I have no connections in this diagram, this will be my next step, but I suspect it won't be any faster.
Attached are a couple of screen shots, one showing the document explorer, and one showing the Pan and Zoom window - the diagram is rather large.




diagram3_6ffc21e2.zip

Ajeet M [Syncfusion]
Replied On January 16, 2009 11:17 AM UTC

Hi Rihard,

Thanks for evaluating Syncfusion products.

You need to use the coding as follows to ensure minimum time to load your symbols to the diagram's model control.

----------

this.diagram1.BeginUpdate();

//
//Enter your code for adding your nodes

this.diagram1.EndUpdate();

----------

This practice of including "the code" to "Add" or "Delete" from diagram's model will ensure the fastest response to the order of just some "milliseconds".

I am attaching my sample file that loads 1000 "Workstation" nodes and layouts them neatly in just 0.890 seconds!

Let me know if this helps.

Happy Coding!

-Ajeet




Diagram_WF_ManySymbols_49464d2e.zip

Richard Deverson
Replied On January 19, 2009 12:40 PM UTC

Hi Ajeet,
Thanks very much for the sample.

When I run the sample using a slightly more complicated symbol, i.e. the Workstations symbol from the NetworkFlowDiagram palette, it takes a long time to load the diagram. About 3 minutes on my PC.

When I run the sample as is, the diagram loads fast (circa 2 seconds).

The performance seems to me to be dependent on the complexity of the symbol models.

It's easy to reproduce, just load the attached palette. The symbol index is the same as in your sample.

I'd be interested to hear what the performance is like in your environment, and if there is anything else I can do to improve it.




NetworkFlowModel_40b25bf5.zip

Richard Deverson
Replied On January 19, 2009 05:44 PM UTC

Hi Ajeet,
Still on the subject of performance.

Do you have any "best practises" for programmatically creating connections between ports?

I have extended my test project to create orthogonal connections between a bunch of ports on my "switch" symbol, and several computers. It takes a long time to load the diagram, so long I gave up waiting!

I enabled line routing and line bridging for each connector. Attached is a code snippet. Any suggestions for performance improvements would be welcomed!





ConnectorCode_b41082d5.zip

Ajeet M [Syncfusion]
Replied On January 22, 2009 01:52 PM UTC

Hi Richard,

I was able to optimise the load time of the "WorkStation" node from your palette "NetworkFlowModel.edp" file.

The result was as follows:

1. With my first optimisation techinque:

700 "Workstation" Nodes: ~35 seconds.

2. With my updated and latest optimisation techinques:

700 "Workstation" Nodes: ~5.7 seconds!

The advanced optimisations used here are as follows:

-----START-------

this.diagram1.Model.BeginUpdate();
this.diagram1.Model.HistoryManager.Pause();
this.diagram1.EventSink.Pause();
this.diagram1.Model.EventSink.Pause();

-------
//AddNodes Code;
-------

this.diagram1.Model.EventSink.Resume();
this.diagram1.EventSink.Resume();
this.diagram1.Model.HistoryManager.Resume();
this.diagram1.Model.EndUpdate();

-------END-------

For your convenience, I am attaching my updated sample file that demonstrates the advanced optimisations used.

Let me know if this helps.

Happy coding!
-Ajeet




Diagram_WF_ManySymbols_ded96baf.zip

Richard Deverson
Replied On January 26, 2009 12:37 PM UTC

Hi Ajeet,
Thanks for the updated sample.

I did some investigation based on this sample, and I discovered that the biggest performance gain was simply through assigning a name to the nodes. I.e.

string s = "my" + count.ToString();
Node node = (Node)paletteGroupView1.Palette.Nodes[1].Clone();
if (myNet != null)
{
this.diagram1.Model.AppendChild(node);
node.Name = s; //This improves performance dramatically!!
}

With this addition, the loading time went from 2 minutes down to 30 seconds, on my lame PC.

Adding EventSink.Pause()/Resume() and HistoryManager.Pause()/Resume() did improve the performance slightly, but it still took 2 minutes to load on my PC.

Attached is the form1.cs file - see the LoadDiagram() method.

regards
Richard



Form1_2bb8cd45.zip

Ajeet M [Syncfusion]
Replied On January 27, 2009 07:47 AM UTC

Hi Richard,

Yes, you correctly identified the area where the performance increased drastically.

This is my personal favourite optimisation technique that I suggest everyone to use who has significantly large nodes on the diagram.

The reason is simple as follows:

The name assigning is more rapid when the application knows what it has to assign, rather when it has to compute an unique name and then assign.

This use of manually assigning the name to the nodes, removes this computational overload from the application and thus the rapid results!

I am sure you liked the optimisation techiniques discussed in this thread.

Happy Coding!
- Ajeet



Administrator [Syncfusion]
Replied On March 3, 2009 08:36 PM UTC

Shouldn't you just "compute unique names" more efficiently???

P.S. Why do I have to enter the email address and "anti-spam" number when I'm already logged in?


Administrator [Syncfusion]
Replied On March 9, 2009 11:43 AM UTC

Hi Richard,
Sorry for the delay in response. I have discussed regarding this performance issues with our development team and they informed me that the performance has been improved drastically in the upcoming VOL 2 release. Regarding the E-mail address and antispam issues there has been already a feature request placed for this forum issue and soon it will be implemented.

Thank you for your patience.
Regards,
Dinesh


Perry van Kuppeveld
Replied On August 29, 2011 02:38 PM UTC

While evaluating your latest version I was running in a performance issue.
When I run the Diagram_WF_ManySymbols sample from previous posting in VS2005, debugger attached, there's no performance problem. When I convert this solution to VS2010, it runs much slower.

Running the executable without debugging gives not a performance problem.

Why is the perfomance of this sample in VS2010 so poor?


Pandi Murugan A [Syncfusion]
Replied On August 31, 2011 10:55 AM UTC

Hi Perry,

Thanks for evaluating Syncfusion products.

I am afraid that i am unable to reproduce the reported performance issue. The sample application taken reasonable time(5.1 secs) to load and Layout(TableLayout) the diagram. Please let me know if you have any concerns.

Regards,
Pandi Murugan A


Perry van Kuppeveld
Replied On September 2, 2011 11:16 AM UTC

Hi Pandi,

I opened the solution in VS2005, hit 'F5'. Time: 8.2 seconds
Running the exe produced by VS2005: Time 8.2 seconds

In VS2010 (after running the convecion wizard) I hit 'F5' Time: 1 minute 56.2 sec.
Running the exe produced by VS2010: Time 8.2 seconds


Amsath Ali M [Syncfusion]
Replied On September 6, 2011 05:36 PM UTC

Hi Perry,

Thanks for the update.

We are afraid that we are not able to reproduce the reported performance issue. The sample application taken reasonable time (6.1 secs) to load and Layout(TableLayout) the diagram.

Please see the below attached video and let us know if you have any queries.
Video1-735692884.zip


Regards,
Amsath Ali. M



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;