Optimize Queue #7

Closed
opened 2023-07-21 15:57:05 +00:00 by erin · 2 comments
Owner

Right now, the queue is likely to expand far faster than it can be processed, and will probably run out of memory quickly.

Possible fixes:

  • Larger buffer size
  • Remove outdated queue items (timestamp for each item)
  • Kill data processing if taking too long
  • Average out and merge buffers in a certain timeframe
Right now, the queue is likely to expand far faster than it can be processed, and will probably run out of memory quickly. Possible fixes: - Larger buffer size - Remove outdated queue items (timestamp for each item) - Kill data processing if taking too long - Average out and merge buffers in a certain timeframe
erin added this to the CyberTail Prototyping project 2023-07-21 15:57:05 +00:00
Author
Owner

Channel is now used as a queue, and pushing will simply block until the queue gets used up.
However, this may lead to EEG data not being read while blocking on the FFT completion, so it will still need to be optimized to prevent that at all costs.

`Channel` is now used as a queue, and pushing will simply block until the queue gets used up. However, this may lead to **EEG** data not being read while blocking on the **FFT** completion, so it will still need to be optimized to prevent that at all costs.
Author
Owner

Queue items older than ~10s (to be tested) are now thrown away.
I could use the try_send() method to return on fail rather than blocking, but I think blocking may be the more ideal scenario? To be tested.

Queue items older than ~10s (to be tested) are now thrown away. I could use the [try_send()](https://docs.embassy.dev/embassy-sync/git/default/channel/struct.Channel.html#method.try_send) method to return on fail rather than blocking, but I think blocking may be the more ideal scenario? To be tested.
erin closed this issue 2023-07-21 20:56:56 +00:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: CyberTail/code#7
No description provided.