To determine what Node the mouse/touch is over (for drags, button presses, etc), Scenery traverses the tree. Right now, the only way to speed this up is to have { pickable: false } in the options to Nodes to tell Scenery to not traverse that part of the tree.
Pickable: false essentially won't allow any events to occur on those nodes, and can significantly improve performance. For instance, the y=0 line, the string, and the clamp/window/pole should all have 'pickable: false' set.
In this sim, it's probably also beneficial for performance to set the control panel backgrounds to 'pickable: false', and all of the control panel labels, tick marks, numeric displays, etc.
To determine what Node the mouse/touch is over (for drags, button presses, etc), Scenery traverses the tree. Right now, the only way to speed this up is to have { pickable: false } in the options to Nodes to tell Scenery to not traverse that part of the tree.
Pickable: false essentially won't allow any events to occur on those nodes, and can significantly improve performance. For instance, the y=0 line, the string, and the clamp/window/pole should all have 'pickable: false' set.
In this sim, it's probably also beneficial for performance to set the control panel backgrounds to 'pickable: false', and all of the control panel labels, tick marks, numeric displays, etc.
Hopefully in a future Scenery version this won't be as necessary (proposal in https://github.com/phetsims/scenery/issues/105)