Conversation
The network thread enqueues frames into a bounded PvObjectQueue and a consumer thread drains them, dropping the newest frame under overload instead of overrunning the monitor thread. Adds PVA_MONITOR_QUEUE_SIZE/PVA_MONITOR_REQUEST.
--prefix defaults to pvapy (the module appends the trailing ':'); --gui/--no-gui toggles the Qt control GUI, with --no-gui running the IOC headless via the module's --ioc-mode.
The reader subscribed with a bare 'field()' request, leaving the pvAccess monitor queue at the tiny default so high-rate frames were dropped (uniqueId gaps) before reaching the client. Add a tunable PVA_MONITOR_SERVER_QUEUE_SIZE composed into the request as record[queueSize=N], separate from the client-side queue.
pecomyint
requested changes
Jul 14, 2026
pecomyint
left a comment
Collaborator
There was a problem hiding this comment.
Nice work. The qMonitor + consumer-thread approach is the right call (matches Sinisa's suggestion). It's thread-safe (queued Qt signals, no cross-thread widget access), the start/stop lifecycle is clean, and it clearly drops fewer frames than main. Three things before I can merge:
- Blocker — client queue default is too large. PVA_MONITOR_QUEUE_SIZE = 15000 is bounded at depth × frame size, but 15k real detector frames is ~10-30 GB compressed (far more uncompressed). Please drop it to a burst-sized default (~256-512); dropping sooner under sustained overload is the intended behavior.
- Descope — pull the
DashPVA iocCLI command into its own PR. This is a safety-critical reader change and I'd like the diff tight and focused; the ioc command is unrelated (and ideally split the AGENTS.md policy edit too). The ValueError save-guard is fine to keep here. - Can you run 1 kHz simulaiton for ~60 s (~60k frames) with a modest queue (512 frames) and confirm frames_missed stays ~0? If drops persist, that's a per-frame processing limit (not a queue-size one), and the default should reflect that. It would be nice to document that beefore and after.
Collaborator
Author
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.

What this does
background thread processes, so receiving and decoding no longer fight over
one thread. Under a flood, old frames are dropped instead of crashing the
viewer. Replaces the old fixed-rate throttle.
DashPVA ioccommand. Starts the RSM-parameter IOC simulator.--prefix(defaultpvapy) sets the PV prefix;--no-guiruns it headless.Also included
Two earlier dev fixes not yet on main: the "all constants live in settings.py"
change, and a guard so a cache-save
ValueErrorno longer crashes the viewer.Bump to version 1.0.3
Testing
drops at normal speed, threads shut down cleanly.
ruffclean.