)
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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Improving the Performance of the Diagram while Selecting and Moving the lots of Nodes

Platform: WinForms |
Control: Diagram |
Published Date: November 13, 2015 |
Last Revised Date: June 2, 2019

Improving the Performance of the Diagram

While performing interaction in the diagram containing lots of nodes (for example: 100 Nodes and 100 Connectors) there will be a dispute in its performance. To overcome the dispute we need to Pause and Resume some of the services which utilizes maximum resources which will be a reason for the performance dispute.

We have listed the services which results maximum resource utilization:

  1. LinkManager,
  2. HistoryManager,
  3. BridgeManager    and
  4. EventSink.

LinkManager:

LinkManager holds the information about the connected Nodes in the diagram.

HistoryManager:

HistoryManager holds the history of the diagram like adding a node and deleting a node.

BridgeManager:

BridgeManager holds the information’s about bridging which is enabled when two connectors intersects each other.

EventSink:

EventSink holds information about the events which are registered in the control.

 

Pause the Service:

The below code snippet is used to pause the service.

[C#]

//Pause the services
void m_diagram_MouseDown(object sender, MouseEventArgs e)
{
   this.m_diagram.Model.LinkManager.Pause();
   this.m_diagram.EventSink.Pause();
   this.m_diagram.Model.EventSink.Pause();
   this.m_diagram.Model.BridgeManager.Pause();
   this.m_diagram.Model.HistoryManager.Pause();
}
 

 

[VB]
Private Sub m_diagram_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs)
 
Me.m_diagram.Model.LinkManager.Pause()
Me.m_diagram.EventSink.Pause()
Me.m_diagram.Model.EventSink.Pause()
Me.m_diagram.Model.BridgeManager.Pause()
Me.m_diagram.Model.HistoryManager.Pause()
 
End Sub

 

Resuming the Service:

The below code snippet is used for resuming the service.

[C#]
 
//Resuming the services
void m_diagram_MouseUp(object sender, MouseEventArgs e)
{            
   this.m_diagram.Model.LinkManager.Resume();
   this.m_diagram.Model.HistoryManager.Resume();
   this.m_diagram.Model.BridgeManager.Resume();
   this.m_diagram.Model.EventSink.Resume();
   this.m_diagram.EventSink.Resume();
}

 

[VB]
 
'Resuming the services
Private Sub m_diagram_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs)
Me.m_diagram.Model.LinkManager.Resume()    
Me.m_diagram.Model.HistoryManager.Resume()
Me.m_diagram.Model.BridgeManager.Resume()
Me.m_diagram.Model.EventSink.Resume()
Me.m_diagram.EventSink.Resume()
End Sub

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile
Live Chat Icon