limit queue size to 10 images for realtime processing - #390
Open
ralph-sj wants to merge 4 commits into
Open
Conversation
Collaborator
|
One suggestion: deque(maxlen=10) (line 48) hard-codes the retained queue size. Since the right value depends on acquisition rate vs. processing throughput — which is hardware/instrument-dependent — could we make this configurable instead of fixed at 10? E.g. thread a queue_size: int = 10 parameter through run_realtime() and expose it as --queue-size on the process-realtime CLI command, the same way watch_folder is already exposed. Default of 10 would keep current behavior unchanged for everyone else. Worth a one-line docstring/help note too: a bigger queue just delays which images get dropped when processing can't keep up — it doesn't fix the underlying backlog — so users don't mistake it for a throughput setting. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Limit the queue size to 10 and remove old images if the queue exceeds this. This skips images and removes backlogs in the realtime processing where processing takes much longer than acquisition.