Skip to content

Fix excessive cpu usage in daq logging. - #69

Merged
brichards64 merged 2 commits into
ToolDAQ:mainfrom
jclewett-warwick:fix_excessive_cpu_usage_in_daqlogging
Aug 10, 2026
Merged

Fix excessive cpu usage in daq logging.#69
brichards64 merged 2 commits into
ToolDAQ:mainfrom
jclewett-warwick:fix_excessive_cpu_usage_in_daqlogging

Conversation

@jclewett-warwick

@jclewett-warwick jclewett-warwick commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

In this case, the zmq::poll is testing the readiness of two channels, an input channel and an output channel.
The output channel is (almost) always ready, so the poll falls straight through, without the intended 1ms pause for thought.
In the case that the output channel is not ready (essentially if it's buffer is full), then the send code below fails silently anyway, negating the value of the poll completely.
By only polling the output channel, the CPU usage in the thread is reduced from 100% to 3%, which is kinder to users working on containers on laptops (my laptop is melting trying to run this code).

jpdclewett and others added 2 commits July 22, 2026 09:45
Removed an unused poll item from the zmq::pollitem_t array.
@brichards64
brichards64 merged commit 384ff28 into ToolDAQ:main Aug 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants