zinnia
zinnia copied to clipboard
More performant persistence of state
This is a follow-up to the discussion in https://github.com/filecoin-station/zinnia/pull/198#discussion_r1182692965.
We should move the code writing state updates to the state file off the main thread to avoid blocking the event loop.
For example, we can spawn a new thread that will periodically flush updates to disk. That requires a graceful shutdown (see #143) to flush the last update during the shutdown.