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. Image for the cookie policy date

Performance of Diagram Updating is Too Slow

Fellows. This is Won.

 

I have used a diagram (in windows) to represent a manufacturing plant, and there are lots of shapes for manufacturing resources, such as conveyors, sorters, and processors. The most problem of my application is too slow for updating the changes of shapes. I used Model.BeginUpdate() and Model.EndUpdate(). I found it takes long when Model.EndUpdate() is in process. Especially, if new shapes are added, updating time is even much more longer. I do not under stand what this situation is. Is there any possible solution to speed up for updating time? the number of shapes in a diagram model is about thousands.

 

Thank you.

 

Sincerely,

Won.


3 Replies

NG Naganathan Ganesh Babu Syncfusion Team August 18, 2015 11:53 AM UTC

Hi Won,


Thanks for using Syncfusion products.


We suggest you to “Pause and Resume” the Diagram’s EventSink, Model.Eventsink, Model.BridgeManager and Model.HistoryManager to improve the performance of the diagramcontrol while loading large number of nodes. Please refer the below code example and sample for your references.

Here is the code:

[C#]


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


//Populate nodes


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


Here is the sample:


Sample


Please let us know if you need further assistance.


Regards,


Naganathan K G



WK Won K. Ham August 19, 2015 10:37 AM UTC

Hello. Naganathan.

 

Your solution was really working on my project. I really appreciate your help. 

Thank you again.


Sincerely,

Won.



NG Naganathan Ganesh Babu Syncfusion Team August 21, 2015 03:59 AM UTC

Hi Won,
Thanks for your update.
We are happy to hear that your problem is resolved. Please let us know if you need any further assistance.
Regards,
Naganathan K G

Loader.
Live Chat Icon For mobile
Up arrow icon