visualization-tool icon indicating copy to clipboard operation
visualization-tool copied to clipboard

Do not re-render everything on any property change

Open bprusinowski opened this issue 3 months ago • 1 comments

Currently, we use one huge useReducer to keep track of the configurator state. Due to this design, the whole application re-renders on every keystroke when adding a chart title, for example (or really, changing any other property).

While it's not terribly slow, the lag is clearly noticeable, especially when developing the application. We should potentially split up the one big reducer into several, dedicated ones that would only make the affected parts of the app re-render.

bprusinowski avatar Sep 25 '25 12:09 bprusinowski

Another things that could help would be to use selectors (https://redux.js.org/usage/deriving-data-selectors#basic-selector-concepts) instead of always asking for the whole state. components would wake up less as they would not be woken up if the area of the config they are concerned about has not changed.

ptbrowne avatar Sep 25 '25 12:09 ptbrowne