ctrlplusb / easy-peasy

Vegetarian friendly state for React

Home Page:https://easy-peasy.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Performance: Modifying data is too time-consuming

yongningfu opened this issue · comments

image
from: https://immerjs.github.io/immer/performance/

I'm dealing with performance issues, and I found that in easy-peasy, data operations are particularly time-consuming, because immer is not set to Freeze.
We didn't use​ Computed properties and​ State persistence.
Can immer freeze be used as a configuration property of createStore?

Thanks

hi @yongningfu ! 👋

Is this a general issue for you, or just for specific actions?

If this is just an issue for specific actions, you may omit immer for these specific actions. Alternatively, you may disable immer for the whole store, via the disableImmer config when creating the store.

hi @jmyrland,We still want to use immer development to improve efficiency

hi @jmyrland,We still want to use immer development to improve efficiency

I see. Currently, if you experience performance issues, your best bet is to omit immer.

Freezing state is a feature that is not prioritized, given that we have the option to omit immer entirely for specific scenarios where performance is an issue.

However, if you have a solution in mind - feel free to contribute by submitting a pull request 👍