参考一下代码: ```ts import { produce } from 'limu'; let data2 = { history: Array.from({ length: 10 }).map(() => ({ list: Array.from({ length: 10000 }).map((_, i) => ({ id: i, })), })), } const start = Date.now(); const newData = produce(data2, draft => { draft.history = draft.history.slice(1); }) console.log('slice', Date.now() - start, 'ms', newData); ``` 输出: slice 1 ms { history: [ <Revoked Proxy> ] } 输出保留了 proxy 状态,导致后续使用数据时出现问题。 出问题版本: ^4.1.1 在 3.13.2 版本中未出现问题,但是在 3.13.2 中对于大对象有性能问题,上述脚本耗时: 1220 ms
Activity
fantasticsoul commentedon Oct 14, 2025
收到建议,我看下是原因
fantasticsoul commentedon Oct 14, 2025
是否用immer测试过,同样情况下相关耗时情况呢