Closed flying-sheep closed 9 years ago
your fix is still laggier than mine. let’s combine them.
should i do another PR or will you include it?
Is it? I'm not seeing any lag at all on Windows 10 or Ubuntu.
for me it still needs some fractions of a second after stopping the mouse until the statusbar arrives at its destination.
heavy mouse movement makes that half a second or so, which is annoying.
improves or even fixes #23
I’m not sure if this is a good approach or even works as intended, but it dramatically increases responsiveness for me. Also it probably leaks all those MouseEvents because I can’t C++.
I call the idea “Sith threads”:
One thread is running, the other queued. If the mouse is moved, the queued one is replaced by a new one. Once the running one is finished it will replace itself with the queued one.
This has an advantage over the “don’t run if last run is less than 100ms in the past” approach commonly used to “debounce” javascript, because this way after stopping the mouse, the correct update (the one triggered by the last event) will happen.