Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update performance.mdx #942

Merged
merged 1 commit into from May 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -62,7 +62,7 @@ title: Immer 性能
- Immer with proxies 大约比手写 reducer 慢 2 到 3 倍(上面的测试用例是最坏的情况,请参阅 `yarn test:perf` 了解更多测试情况)。这在实践中可以忽略不计。
- Immer 的速度大致与 ImmutableJS 一样快。但是,_immutableJS + toJS_ 明确了后期往往需要付出的代价;将 immutableJS 对象转换回普通对象,以便将它们传递给组件或者进行序列化操作在网络中传输......(还有将从服务器接收到的数据转换为不可变 JS 的前期成本)
- 生成 patches 不会显著减慢 immer
- ES5 后备实现的速度大约是代理实现的两倍,在某些情况下更糟。
- ES5 后备实现的速度大约比代理实现慢两倍,在某些情况下更糟。

## 性能提示

Expand Down