Runtime & worker: optimistations for large state objects
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 23
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 17
Description
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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the end-of-step processing for state objects in the runtime and worker, tracing cleanup, size checks, circular-reference handling, and serialization through the worker thread, child process, and websocket. Compare the costs of these paths for large state objects and define benchmarks and acceptance criteria before choosing an optimization; the issue does not name files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100