Skip to content

Runtime & worker: optimistations for large state objects #1374

@josephjclark

Description

@josephjclark

I want to think about how to optimise large state objects

At the end of each step we do a bunch of processing on objects, including:

  • cleaning up the returned state
  • serializing the state object out of the worker thread
  • serializing the state object out of the child process
  • serializing the state object through the websocket
  • trying to work out the size of the object (once or many times)
  • I think there's some stuff about removing circular references

I'd like to explore things like:

  • using shared memory buffers to reduce serialization
  • using heuristics to guess that state object is large (Ie, an array of 10k items, or an object more than 100 properties deep), and then optimising around that (like bailing out of serialization and circularity checking earlier)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    New Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions