ruundii / bthidhub

Bluetooth HID hub
MIT License
309 stars 51 forks source link

Pointer lag #24

Closed Dreamsorcerer closed 3 years ago

Dreamsorcerer commented 3 years ago

With a Razer gaming mouse, moving the mouse results in significant lag (like the cursor will continue moving for a second after I've stopped). If I keep the mouse still and just click the button, there is no noticeable lag.

This suggests to me that (because it is a gaming mouse) the mouse is sending events faster than they are being processed, creating a blocked queue of events which can take seconds to finish being processed after incoming events have finished.

2 possible solutions I can think of:

  1. Improve processing performance to reduce the likelihood of queue buildup (this probably requires 1ms or under processing times).
  2. Figure out a way to discard some events or clear the event queue when a buildup happens.
Dreamsorcerer commented 3 years ago

This is mostly fixed by #27. There is still occasional noticeable lag, but it's certainly usable now.