Going through the usual redux method for updating nodes is not particularly fast. Actions are dispatched, reducer logic is called, etc, etc.
In a simple world, all we'd need to do is mutate the state wherever we want to update node values. Not only is this a bit ugly but it also doesn't allow us to hook in functionality when nodes update. Currently macros listen to NODE_VALUE_UPDATE and NODE_VALUES_BATCH_UPDATE, so this needs to be handled.
It might make more sense to simply call a function rather than dispatch an action when updating node values. This function could do the state mutation and also do any extras such as the macro handling.
Going through the usual redux method for updating nodes is not particularly fast. Actions are dispatched, reducer logic is called, etc, etc.
In a simple world, all we'd need to do is mutate the state wherever we want to update node values. Not only is this a bit ugly but it also doesn't allow us to hook in functionality when nodes update. Currently macros listen to
NODE_VALUE_UPDATE
andNODE_VALUES_BATCH_UPDATE
, so this needs to be handled.It might make more sense to simply call a function rather than dispatch an action when updating node values. This function could do the state mutation and also do any extras such as the macro handling.
After https://github.com/nudibranchrecords/hedron/pull/381 we've had some fairly nice performance gains so I'm not sure how much this proposed change would improve performance.