Browser unresponsive

I have a matrix diagram, using table layout.
Scenario:
Deleted a column from matrix, then tried to move a node to mainheader of the matrix. Suddenly the browser got unresponsive. When I debugged the code the browser became unresponsive when e.diagram.layoutDiagram(true); is called.

Is there any way to overcome this or anyone faced such issue before?

What is the Diagram.layout? Are there any Group.layouts, and if so, what are they? How many nodes and links are there, and how are they distributed amongst the Groups?