Closed thehale closed 1 year ago
Consider removing the messages
attribute from PuzzleRegistryEntry
and instead requiring all parties interested in messages to register a listener.
With that implementation, the PracticeView
can register a listener when an attempt starts and remove it when done.
Smartcubes with Gryoscopes (e.g. GoCube Edge) generate thousands of messages per minute. Holding onto all those messages over the course of a multi-hour solve session could lead to running out of memory.
The messages are only stored in-memory so that they can be grabbed as a batch to persist alongside a completed Attempt. We can improve performance by only storing messages in-memory when an attempt is running.