Skip to content

add way to ratelimit mouse input events #275

Open
@ardera

Description

@ardera

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions