speed up time to switch edit or select modes on large designs, by changing css classes on strands and strand parts outside of React/Redux for efficiency, and pulling edit/select mode information out of view components to decrease re-rendering time when edit/select modes change #370
Labels
Currently, changing the edit or select mode re-renders every Strand React component and every subcomponent, because all of them take the
AppUIState
's Edit modes and Select modes as props. They do this so that they know whether to add the classes"selectable"
and"selected"
, which indicates to the CSS file how to style them on mouseover (e.g., making them "glow" or turn pink).This is immensely slow on large designs to switch between edit modes or select modes.
This is an instance where it is probably best for efficiency to side-step React and have the state change trigger a middleware that reaches directly into the DOM to change these classes.
It is also necessary to add middleware (
mode_sensitive_actions_filter_middleware
) to help discard/transform certain actions, because the view components now do not have enough information to know whether an action is permissible to dispatch, or what type of action to create (e.g., when clicking on a domain, are we in select mode to select the strand? in nick mode to nick the domain?)The text was updated successfully, but these errors were encountered: