-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
The immutable invariant middleware is relatively slow, because it does deep checks on the whole state, and uses recursion.
I wonder if we'd be able to speed it up by:
- Converting the recursion to some sort of a loop with a queue
- Skipping certain items if they're already frozen
Granted, this only affects dev mode and not prod, but if we can speed it up a bit that would be a net win.
There are some other mutation detection options out there that involve proxies, like https://www.npmjs.com/package/mutation-sentinel and https://www.npmjs.com/package/will-mutate , but not sure if those approaches would work sufficiently for our use case.
thorn0
Metadata
Metadata
Assignees
Labels
No labels