OpenHantek / OpenHantek6022

OpenHantek6022 is a DSO software for Hantek USB digital signal oscilloscopes 6022BE / BL. Development OS is Debian Linux, but the program also works on FreeBSD, MacOS, RaspberryPi and Windows. No support for non-Linux related issues unless a volunteer steps in!
GNU General Public License v3.0
868 stars 153 forks source link

High CPU load when paused #123

Closed white-dragon closed 4 years ago

white-dragon commented 4 years ago

when paused on UltraHD on my I7-7700T its eats about 50% CPU (of one core) mayb it useless cyclic rendering static image?

Ho-Ro commented 4 years ago

You can lower CPU load by setting menu: Oscilloscope/Settings/Scope -> Minimal time between... to minimal 1ms. The permanent rendering is necessary because you can change the settings (e.g. voltage, timebase or trigger position) and the "static" image changes.

white-dragon commented 4 years ago

and why u cant render new static image when settings change?

Ho-Ro commented 4 years ago

... because this has low priority for me. You are welcome to send a pull request.

A good starting point is hantekdsocontrol.cpp#L711:

// always run the display (slowly at t=displayInterval) to allow user interaction
// ... but update immediately if new triggered data is available after untriggered

Make sure you do not miss any user intervention that could change the content of the display, i.e. voltage, timing, trigger offset and trigger position, marker, zoom, measure, ... (you get the point)