-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Description
Currently the Vuex panel takes a JSON snapshot of the entire store on every mutation, and this can lead to perf problems when the store state is large, or when there are many mutations being committed with short intervals.
Instead of the taking a full snapshot every time, we can:
- Keep a snapshot of initial state on the app side.
- Only send the mutations to the devtool side.
- When a state frame is inspected on the devtool side, send a request to the app side, with the list of mutations committed since the initial state.
- The app side replays the mutations and send the resolved state back to the devtool side.
- Resolved state can be cached on the devtool side with an LRU.
This means inspected state snapshots are resolved on demand, and each mutation only sends a payload of the mutation itself, which should be drastically cheaper.
dramaking, IdealChain, zechdc, alukos, jimmityglick and 2 morecmpsleo and nandes2062