Kitware / clique

Graph editor library/application
Apache License 2.0
10 stars 6 forks source link

Speed up deselection of nodes and links. #153

Closed manthey closed 8 years ago

manthey commented 8 years ago

Whenever a mouse down event occured, all links and all nodes, regardless of state, were explicitly deselected. For each node and link, and event was triggered that it had been removed from the selection. For even modest sized graphs of a few hundred nodes, this results in a very slow process. Clicking in a black space on the graph multiple times would bind up the web page in copious callbacks (which would also trigger many GC cycles).

This has been changed to only deselect selected nodes and links, and only to rerender nodes if a node was deselected. remove events are only fired for nodes and links that were actually deselected.

waxlamp commented 8 years ago

LGTM. Thanks for a performance improvement!