Skip to content

Vuex recording performance improvements #546

@yyx990803

Description

@yyx990803

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions