Restore Window Layout slows down over time

Note: Before bug reporting, please make sure you have tried the latest (alpha) version of BetterTouchTool and that you have already tried to restart your system :-). If you encounter a crash, please attach a crash log from the macOS Console.app from the "User Diagnostic Reports" section.

Describe the bug

I have an action to Restore Window Layout with a configuration that looks like this:

[
{
"size": "{1937, 1417}",
"parentTitle": "Slack",
"position": "{-0, 23}",
"role": "AXWindow"
},
{
"size": "{622, 1417}",
"parentTitle": "zoom.us",
"position": "{1938, 23}",
"role": "AXWindow"
}
]

When I restart my laptop, this action completes very quickly (instantly). But over time, the action takes longer and longer. Sometimes when I in a zoom meeting, there is stuttering in the video (assuming a large amount of CPU is being used for the action) for a couple of seconds until the windows snap.

After restarting my laptop, it works just fine again.

Screenshots
If applicable, add screenshots to help explain your problem. (You can just paste or drag them here)

Device information:

  • Type of Mac: 16-inch, 2019
  • macOS version: 10.15.7
  • BetterTouchTool version: 3.570

Additional information (e.g. StackTraces, related issues, screenshots, workarounds, etc.):

this function takes longer the more windows are open, this is something that can not be improved by much I think because the API to query the windows is slow.

Can you also reproduce this with only few windows open?