rxhanson / Rectangle

Move and resize windows on macOS with keyboard shortcuts and snap areas
https://rectangleapp.com
Other
25.1k stars 742 forks source link

Runtime performance difference between Rectangle and Rectangle Pro? #1275

Closed xeoneux closed 8 months ago

xeoneux commented 9 months ago

Hi, I'm a user of Rectangle Pro and got it to support your amazing app! However, I currently do not use features of Rectangle Pro (I just didn't get time to look at them, I'm sure they would be really helpful for my workflow) I was wondering, is there any runtime performance difference between Rectangle and Rectangle Pro? There would be a different set of APIs to support the features in Rectangle Pro, how much of a hit would the memory and CPU usage take if it's running but the features are not getting used? Are there any benchmarks for it? Thanks!

rxhanson commented 9 months ago

I don't have benchmarks, but here are the only features that will cause any noticeable change in system resource usage between the two:

  1. Using the window throw will listen to mouse movement when your configured modifier keys are held. This will cause a small increase in CPU usage when the mouse moved events are then piped to the app.
  2. Using the trackpad gesture for the window throw will listen to gesture input, and this will cause a small increase in CPU usage when there are trackpad touches.

The CPU usage is still really low, even with using those features heavily and from my testing the impact on battery life / energy usage has been negligible compared to other apps I use.