You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The changes to isPlainObject introduced in #767 added a more comprehensive check that worked for objects across iframes which relies on Function.toString:
This more robust check is quite expensive for the common case where the object instance comes from the same frame and a simpler equality check would suffice.
I will submit a PR to remedy this.
Link to repro
N/A (Perf)
To Reproduce
N/A (Perf)
Observed behavior
In our app we invoke immer.applyPatches multiple times per second based on WebSocket events. The calls to Function.toString have a noticeable performance impact on our app.
Expected behavior
The utility method should not have a substantial impact on performance.
Environment
We only accept bug reports against the latest Immer version.
Immer version:
I filed this report against the latest version of Immer
Occurs with setUseProxies(true)
Occurs with setUseProxies(false) (ES5 only)
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
The changes to
isPlainObject
introduced in #767 added a more comprehensive check that worked for objects across iframes which relies onFunction.toString
:This more robust check is quite expensive for the common case where the object instance comes from the same frame and a simpler equality check would suffice.
I will submit a PR to remedy this.
Link to repro
N/A (Perf)
To Reproduce
N/A (Perf)
Observed behavior
In our app we invoke
immer.applyPatches
multiple times per second based on WebSocket events. The calls toFunction.toString
have a noticeable performance impact on our app.Expected behavior
The utility method should not have a substantial impact on performance.
Environment
We only accept bug reports against the latest Immer version.
setUseProxies(true)
setUseProxies(false)
(ES5 only)The text was updated successfully, but these errors were encountered: