|| | |||Browse by category|
Why does selection in Diagrammer/SDM often take a long time?
The following is one possible reason for slow selection:
If you have a lot of objects on the screen *and* your selection feedback changes the size of an object *and* you use a graph/link layout renderer in automatic mode, then the slight size change will trigger an expensive relayout.
It is better either not to have a size change when doing selection, or to disable the automatic mode of the layout renderer.
In fact, the situation occurs most often with the link layout. If selection changes the size of the node, the links shift slightly and therefore a link layout is triggered in automatic mode. The link layout considers all links.
Therefore, if your graph has many links, the layout caused by the selection will not be very fast.
To avoid this effect, specify a CSS rule that changes only colors when selecting objects, but does not change the size of any object.
An other option is to specify the renderingDoneMode of the SDM engine, in CSS:
renderingDoneMode : 2; // graph layout is NEVER called automatically on events