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.
Unfortunately, activation email could not send to your email. Please try again.

[DIAGRAM} FilledPath.CentralPort.Disconnect and Connect takes up to 250 ms each

Thread ID:

Created:

Updated:

Platform:

Replies:

128857 Feb 13,2017 02:59 AM Feb 17,2017 01:10 AM Windows Forms 3
loading
Tags: Diagram
Marco Casella
Asked On February 13, 2017 02:59 AM

I have a one time update code similar to this: 

            var shapes = this.diagram1.Model.Nodes.OfType<FilledPath>();
            foreach (FilledPath shape in shapes)
                foreach (ConnectorBase connector in shape.EdgesLeaving.OfType<ConnectorBase>())
                {
                    shape.CentralPort.Disconnect(connector.TailEndPoint);
                    shape.CentralPort.Connect(connector.TailEndPoint);
                }

            foreach (FilledPath shape in shapes)
                foreach (ConnectorBase connector in shape.EdgesEntering.OfType<ConnectorBase>())
                {
                    shape.CentralPort.Disconnect(connector.HeadEndPoint);
                    shape.CentralPort.Connect(connector.HeadEndPoint);
                }

Each connect and disconnect can take up to 250ms, taking one minute for all the FilledPath, calling the Garbage Collection on each connect or disconnect.

Can I speed up the process in some way?



Best regards

Marco



Naganathan Ganesh Babu [Syncfusion]
Replied On February 14, 2017 04:31 AM

Hi Marco, 
 
Thanks for contacting Syncfusion support. 
 
On further analysis, the connect/disconnect method taking 40ms for each connector. Please refer to the below video for your reference.  
 
Video: 
 
 
We have checked your requirement only in our latest version of Syncfusion Diagram control and it contains only one connector established with the connection. So, could you please share us the following information, 
1.     Number of nodes and connectors available in the sample, 
2.     The version you are using in which the reported problem occurs, 
3.     Your sample. 
Which will help us to analyze further and provide you a better solution.  
 
Regards, 
 
Naganathan K G 
 


Marco Casella
Replied On February 14, 2017 11:51 AM

The diagram was around 50 (derived) shapes and 50 links.
With this number of elements disconnecting or connecting a link takes long time, launch garbage collection on every call and a large amount of memory (sometimes throws an OutOfMemory exception after 200 call).

BTW, I have resolved by pausing some Diagram service:

https://www.syncfusion.com/kb/5702/improving-the-performance-of-the-diagram-while-selecting-and-moving-the-lots-of-nodes



best regards
Marco

Naganathan Ganesh Babu [Syncfusion]
Replied On February 17, 2017 01:10 AM

Hi Marco, 
  
We have updated the response in incident which is created by you for the same query. Please follow-up with that incident for furthers details.  
  
  
Regards, 
  
Naganathan K G 
 


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.

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.

;