boenfu / vuex-along

:memo: auto save and restore state for vuex
https://boenfu.github.io/vuex-along/
MIT License
259 stars 36 forks source link

"cloneDepp" will cause a lot of performance consumption #68

Open guoshengnan9 opened 8 months ago

guoshengnan9 commented 8 months ago

代码片段 May I ask why "cloneDeep" is used to perform deep copy here? Can the deep copy here be removed? When moving a large amount of data, "cloneDepp" here will cause a lot of performance consumption.

boenfu commented 8 months ago

Maybe we can add a cloneFn option to VuexAlongOptions, default value was cloneDeep and you can pass a noop. Would you like to make this change, very much looking forward to it!