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
close icon

Save diagram and multiselection performance

Dear Support,
I'm using v10.4.0.71.

Diagrams that our customer is drawing with Diagram component contain hundreds of symbols (in part standard and in part custom).

The Save action in a memory stream takes very long time (more or less the proportion is 5 ore more seconds every 60-80 symbols).
Time does not change compiling in release and does not depends on my custom symbols.
As Save action is needed by the appllication at every change more than half of the time is spent waitng for save. That's not admittable for the customer.

Another problem when the number of symbol increase is that Selection action (with mouse, clicking and drawing the selection rectangle) become very slow and jerky: the selection rectangle does not follow the mouse pointer even the mouse movement is slow. This behaviour becomes awful when the selection takes more than 10-12 symbols

Please I need urgent help to solve those topics

Best regards

Domenico


9 Replies

SC Sudhakar C Syncfusion Team January 17, 2013 11:17 AM UTC

Hi Domenico,

 

We have analyzed your query, please find the response in below.

 

                              Query

                              Response

The Save action in a memory stream takes very long time (more or less the proportion is 5 or more seconds every 60-80 symbols).

By default, When the number of Nodes & Line Connectors are high, it will take some time to save the diagram. Because we have used frame work xamlwriter to save & load the diagram. We haven’t customize anything when save the diagram. So, it will take frame work time.

when the number of symbol increase is that Selection action (with mouse, clicking and drawing the selection rectangle) become very slow and jerky:

We can increase the performance by enabling the EnableVirtualization property of the diagram view When the number of Nodes & Line Connectors are high. So, please enable the EnableVirtualization property of the diagram view to increase the performance of the diagram.  

Please refer the following code snippet to use the Virtualization property of the diagram view.

Code Snippet :

diagramView1.EnableVirtualization = true;

For more information about the Virtualization, please refer our Syncfusion online documentation from the below link.

Documentation Link : http://help.syncfusion.com/wpf/diagram

Here navigate to Concepts and Features à  Diagram View à Virtualization for DiagramControl.  

 

Please let us know if you require further assistance on this.

 

Regards,

Sudhakar.C



DM Domenico Mozzone January 18, 2013 10:18 AM UTC

Thank you for reply,
I take note of what you told me and I will report to the customer.

Just another question.
I need to disable default node and connector context menu of diagramview, hooking custon menuitem in particular conditions.
I tired different methods without success,

Can you help me?

Thank you,
Kind regards

Domenico


SC Sudhakar C Syncfusion Team January 22, 2013 04:54 AM UTC

Hi Domenico,

 

We can disable the default Context Menu for the Node & Line Connector by collapse the visibility of the NodeContextMenu / LineConnectorContextMenu property of the diagram view. Please refer the following code snippet to disable the default Context menu.

 

Code Snippet :

diagramView.NodeContextMenu = new ContextMenu() {Visibility=Visibility.Collapsed };

diagramView.LineConnectorContextMenu = new ContextMenu() {Visibility=Visibility.Collapsed };

 

 

And also, we can add the custom Context Menu to Node / Line Connector by specifying the custom Context Menu to NodeContextMenu / LineConnectorContextMenu property of the diagram view. For more information about adding the custom Context Menu, please refer our Syncfusion online Documentation from the below link.

 

Documentation Link : http://help.syncfusion.com/ug/wpf/diagram/default.htm#!Documents/customizethecontextmenuofnodesandlineconnectors.htm

 

However, we have created a sample for your reference. In that sample, if you right click the Node /  Line Connector, the custom Context Menu will be open. And if you clcik the Menu Items, the Message Box will show which Menu Item is clicked. For more information please refer the attached sample.

 

Please let us know if you require further assistance on this.

 

Regards,

Sudhakar C



ContextMenuSample_b590ad07.zip


DM Domenico Mozzone January 23, 2013 10:56 AM UTC

Thank you for your help

Domenico Mozzone



SC Sudhakar C Syncfusion Team January 23, 2013 11:23 AM UTC

Hi Domenico,

 

Thanks for the reply. Please let us know if you have any other concerns. As always, we will be happy to assist you. Thanks for using Syncfusion Products.

 

Regards,

Sudhakar.C 



DM Domenico Mozzone January 25, 2013 11:42 AM UTC

Hi Sudhakar,
the problem related to long time to save diagram is becoming very serious. 
Our customer is going to reject the SL5 application as time spent to save (operation needed every few synbol drops for application logic requirement) in practise does not allow to use it.

Is it possible to have a workaround?
I tried to put the save operation in a separate thread, or task but the use of DiagramControl.Dispatcher pattern to solve cross-thread problem seems to freeze the UI anyway.
Could you provide an example of background save operation started by user click on a button for example, without UI freeze and with busy indicator if possible?
Thank you
Best regards 
Domenico


DM Domenico Mozzone January 29, 2013 12:24 PM UTC

Hi Sudhakar,
I tried to use BusyIndicator to give a feedback to the user with the aim to transform the save operation in asynchronous.
In the attached solution a new task is started clicking the save button.
The BusyIndicator should appear and inform the end user about long save operation, but I have not found a combination of Task (or BackgroundWorker) and Dispatcher use to get the BusyIndicator: save button remains pressed for all save time.
Where my mistake?

Best Regards
Domenico



TestMultipleSelectionAndSave_d1769af2.zip


SC Sudhakar C Syncfusion Team January 31, 2013 07:03 PM UTC

Hi Domenico,

 

We are analyzing on your requirement. We will update the status of your requirement on Monday (February 4th, 2013). We will appreciate your patience until then.

 

Regards

 

Sudhakar C  



SC Sudhakar C Syncfusion Team February 4, 2013 06:48 AM UTC

Hi Domenico,

 

We have modified the sample, in that sample, we have set the IsBusy property of the Busy Indicator to true when click the SaveStreamBtn button. And, we have set the Header of the Busy Indicator to “Reading...Please wait a moment” and also we have set some minimal time to display the Busy Indicator. Now, if you click the SaveStreamBtn button, the Busy Indicator will be shown in page and also we can’t do anything In the page until the Busy Indicator has been closed. For more information, please refer the image & sample. 

 

Please let us know if you require further assistance on this.

 

Regards,

 

Sudhakar C



TestMultipleSelectionAndSave_d1769af2_eede439e.zip

Loader.
Live Chat Icon For mobile
Up arrow icon