-
-
Notifications
You must be signed in to change notification settings - Fork 558
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
macOs Mojave noticably delay #411
Comments
It's deffinitly a problem The logs for
This problem effectively makes my mac / activitywatch unusable for my use. |
Without actually having done any profiling, just looking quickly at the code, I do imagine if the following line isn't run async that it might create some problems: |
This stackoverflow answer hints to that it might be possible to use the Carbon Accessibility API to ask for current active window title. That might be more efficient than running osascript. This other StackOverflow answer also shows that the ASOC library allows you to call into applescript directly. But it would be better to just use the accessibility API if possible. |
Decompiling printAppTitle.scpt by downloading it and running
I do wonder if this is the thing that slows it down, or if the problem is elsewhere. It would also be nice if one could deliver the same functionality without having to refer to |
There's significant work on moving away from the AppleScript solution at ActivityWatch/aw-watcher-window#40 . It does require some significant changes though, partially becase of the problems getting both app name and window title, and partially because of problems getting the native accessibility API access. Your performance issues probably aren't because of that though, it's mostly because of the system events spam I think. More details here, #380 and I recommend we move future discussion there as well will be closing this issue for now, to keep most information about this bug in one place. There are some suggested workaround there in the latest comments, I recommend you look through them. Your report did help me narrow it down that this is surely happening for brew installs. I also have not been able to reproduce on Catalina, but we have had multiple reports of this problem on Mojave. Work is being done on actually giving a sensible error on these cases / |
For us to be able to understand the issue you're having you need to follow this template. Please make sure there isn't already an issue for the bug you've found, otherwise it'll just take more resources, which means less time for us to actually fix bugs. Thanks for reporting!
Describe the bug
First time testing out ActivityWatch, installed it using
brew cask install activitywatch
. After installing it I'm noticing a bunch of delays when doing all kinds of stuff. Writing in chrome stutters. Switching windows sometimes have a small (a few hundred milliseconds? at least enough to be noticeable and annoying) delays before it gets active.I can't do anything but assume that ActivityWatch is the one imposing these delays / stutters as it started happening right as I installed and started the app.
To Reproduce
Happening on a new install after starting it and giving it accessibility access.
Environment
The text was updated successfully, but these errors were encountered: