Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add way to ratelimit mouse input events #275

Open
ardera opened this issue Aug 18, 2022 · 0 comments
Open

add way to ratelimit mouse input events #275

ardera opened this issue Aug 18, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@ardera
Copy link
Owner

ardera commented Aug 18, 2022

With mice that deliver events at 1000Hz, the platform thread (especially on slower embedded devices) might become overloaded with processing mouse events. There should be a way to limit the rate at which mouse events are processed, for example, only at 60Hz or 120Hz, possibly via a --mouse-ratelimit cmdline option or a MOUSE_RATELIMIT build arg.

Optionally input event processing could also be moved to a seperate thread since technically only the dispatching of the pointer events (to the flutter engine) needs to be done on the platform task thread.

Ideally the kernel would do this, and there's an option for that in the usbhid driver, but at least in my testing with a razer viper that option didn't really change anything. Even with a reboot, setting usbhid.mousepoll to 10 to do 100Hz polling resulted in evhz still reporting an avg rate of 980Hz.

@ardera ardera added the enhancement New feature or request label Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant