Selection in Diagrammer/SDM often take a long time

Article ID: 2305
Last updated: 01 Dec, 2014
Article ID: 2305
Last updated: 01 Dec, 2014
Revision: 1
Views: 655
Posted: 18 Jun, 2010
by Dean J.
Updated: 01 Dec, 2014
by Lenormand P.

Question

Why does selection in Diagrammer/SDM often take a long time?

Answer

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:

SMD {
renderingDoneMode : 2; // graph layout is NEVER called automatically on events
}

Related information

Use Layout only when needed

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2305
Last updated: 01 Dec, 2014
Revision: 1
Views: 655
Posted: 18 Jun, 2010 by Dean J.
Updated: 01 Dec, 2014 by Lenormand P.
Also listed in


Others in this category