MacGesture/MacGesture

High CPU usage (~30% on M1 Pro) whenever I move the mouse

Closed this issue · 4 comments

Describe the bug
The MacGesture uses ~30% of the CPU on M1 Pro whenever I move the mouse.

Steps To Reproduce

  1. Enable MacGesture
  2. Move the mouse without any key press

Expected behaviour
Should not use high CPU when not pressing any keys

Screenshots
image

Desktop (please complete the following information):

  • OS: macOS 13.5 (22G74)
  • Browser Firefox,
  • Version 3.2.0

Additional context
No

image

did you use the right arch of your computer?

image

did you use the right arch of your computer?

Yes, It's 'Apple'

Here's a trace file I ran using Xcode's profiler, it occurs at 45 to 60 seconds.
Seems the major CPU usage has nothing to do with MacGesture, but a problem with macOS, A higher mouse polling rate is likely to cause the problem (mine is 1000hz)

https://news.ycombinator.com/item?id=27571523

45s~60s.trace.zip
图片

I've changed the polling rate to 125hz, and the CPU usage is reduced to ~5%
图片