scopehal-apps icon indicating copy to clipboard operation
scopehal-apps copied to clipboard

Rate limit dragging interactions

Open 602p opened this issue 2 years ago • 0 comments

For parameters controlled by dragging in the UI (trigger level, offset) we currently issue commands to the scopehal Oscilloscopes upon each reported mouse movement. This is inefficient and can easily bog down a slow control connection. We should:

  • limit these updates to a fixed maximum rate (e.g. 5Hz) and at the end of a drag
  • avoid issuing them if there's no semantic change (e.g. if moved by less than the granularity the scope provides)

The former limit is probably best implemented in glscopeclient because it needs to be aware of when the drag ends. The latter limit is probably best implemented in the various drivers in scopehal that have some knowledge of the granularity of the scope's settings (but this is thorny because the scope's rounding/truncating behavior is not always transparent.)

602p avatar Apr 21 '22 16:04 602p