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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Bad Performance when Load Binary Memory Stream

Thread ID:

Created:

Updated:

Platform:

Replies:

116109 Apr 3,2014 10:00 AM UTC May 6,2014 07:41 PM UTC WinForms 15
loading
Tags: Diagram
Arie Hintono
Asked On April 3, 2014 10:00 AM UTC

Hi, I have code "Diagram1.LoadBinary(New MemoryStream(DiagramBinary))" with size of DiagramBinary is 14872714 byte, I must spend my time around 30 seconds to load this binary.
I think 30 seconds is very slow since I have standard on my program to not more than 5second every opening form.
Can you help me

Amsath Ali M [Syncfusion]
Replied On April 9, 2014 04:19 PM UTC

Hi Teddy,

 

Thanks for your interest in Syncfusion products.

 

Before looking into the issue, could you please share us the diagram file which causes the reported issue, this will help us to reproduce the issue effectively at our end and to provide a better solution to you?

 

Please let us know if you have any queries.

 

Regards,

Amsath


Arie Hintono
Replied On April 21, 2014 10:07 AM UTC

Hi, how I can share you the file diagram?

Amsath Ali M [Syncfusion]
Replied On April 22, 2014 12:10 PM UTC

Hi Teddy,

 

Thanks for your update.

 

We suggest you to click the button with ‘+’ sign which is located below response editor box to attach files.

Please refer the below attached image and let us know if you have any queries.

 

Regards,

Amsath


Attachment: Image_6b367712.zip

Arie Hintono
Replied On April 23, 2014 05:30 AM UTC

Hi, here is my binary data

Attachment: File_b8b0baa7.rar

Senthil Kumar M [Syncfusion]
Replied On April 25, 2014 12:04 PM UTC

Hi Teddy,

 

Thanks for the update.

 

Please note that diagram rendering time based on number of nodes and connectors added in the diagram control. We have tested the file which is shared by you and it takes 12 to 15 seconds to render the diagram.

We suggest you to use the Model’s “BeginUpdate” and “EndUpdate” methods in order to reduce the diagram rendering time. Please refer the below code snippet.

 

[C#]

this.diagram1.Model.BeginUpdate();

this.diagram1.LoadBinary(@"..\..\BinaryFile\File");

this.diagram1.Model.EndUpdate();

 

Please let us know if any concerns.

 

Regards,

Senthilkumar M


Arie Hintono
Replied On April 28, 2014 04:29 AM UTC

Hi,

Maybe we have different specification so that the time needed for load the binary is different between us. Anyway, BeginUpdate and EndUpdate isn't affect much (or I can tell, didn't affect at all), it still very slow when I load it. Do you have another approach?  

Thanks

Arie Hintono
Replied On April 28, 2014 10:05 AM UTC

FYI, my Syncfusion version is 8.4.0.10

Amsath Ali M [Syncfusion]
Replied On April 30, 2014 03:45 AM UTC

Hi Teddy,

 

Thanks for your update.

 

We are working on this with high priority and we will update you with more details in one business day (05/01/2014).

 

Please let us know if you have any queries.

 

Regards,

Amsath


Amsath Ali M [Syncfusion]
Replied On April 30, 2014 12:01 PM UTC

Hi Teddy,

 

Thanks for your patience.

 

We suggest you to use Diagram’s ‘BeginUpdate/EndUpdate’ and ‘Pause/Resume’ the Diagram’s EventSink, Model.Eventsink, Model.BridgeManager, Model.HistoryManager to improve the performance of the control while loading large number of nodes (we are able to load the provided diagram file in 10-12 secs in version 8.4.0.10). Please refer the below code snippet.

 

Here is the code:

[C#]

diagram1.Model.BeginUpdate();

            diagram1.EventSink.Pause();

            diagram1.Model.EventSink.Pause();

            diagram1.Model.BridgeManager.Pause();

            diagram1.Model.HistoryManager.Pause();

 

            this.diagram1.LoadBinary(@"..//..//File");

 

            diagram1.Model.HistoryManager.Resume();

            diagram1.Model.BridgeManager.Resume();

            diagram1.Model.EventSink.Resume();

            diagram1.EventSink.Resume();

            diagram1.Model.EndUpdate();

Please try the attached sample and let us know if you have any queries.

 

Regards,

Amsath Ali. M


Attachment: 116109_9b1f6643.zip

Arie Hintono
Replied On May 1, 2014 04:41 PM UTC

Hi,

I've tried your approach and it seems that it didnt really work.
On my computer,it just increase the performance just 1 sec

Arie Hintono
Replied On May 2, 2014 02:00 AM UTC

Hi,

Or maybe you have resolve this performance issue in newer version?

Amsath Ali M [Syncfusion]
Replied On May 2, 2014 01:01 PM UTC

Hi Teddy,

 

Thanks for your update.

 

Please note that the time taken to render the content of the diagram is directly proportional to the number of nodes or complex shapes present in that diagram, and it also depends on the configuration of the processing machine. Since we are able to load the provided diagram file in 10 – 12 seconds in our side, could you please share us your application if it is feasible and your machine configuration, this will help us to analyse the issue further and to provide a better solution to you?

 

Please let us know if you have any queries.

 

Regards,

Amsath


Arie Hintono
Replied On May 5, 2014 08:07 AM UTC

Hi,

Actually I have a qualified specification hardware.
I just wanna know, is it need to take time 10-12sec to load that many node on diagram (my binary file)?

Arie Hintono
Replied On May 5, 2014 09:51 AM UTC

Hi,

Actually I have a qualified specification hardware.
I just wanna know, is it need to take time 10-12sec to load that many node on diagram (my binary file)?

FYI, my hardware specification: Processor i7 and 4gb or more RAM

Amsath Ali M [Syncfusion]
Replied On May 6, 2014 07:41 PM UTC

Hi Teddy,

 

Thanks for your update.

 

Please note that based on our current architecture, the diagram control takes some reasonable amount of time (10 -12 secs in your case) in order to render the nodes and connectors contained in the model, and then updates the graphics path of the connectors when changing the layout (updating the position of nodes) of the diagram and it is directly proportional to the number of nodes contained in the model which is unavoidable.

 

Please let us know if you have any queries.

 

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

;