question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

macOs Mojave noticably delay

See original GitHub issue

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

  • ActivityWatch version: 0.9.2
  • OS: macOs Mojave 10.14.6

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
xylixcommented, Apr 16, 2020

There’s significant work on moving away from the AppleScript solution at https://github.com/ActivityWatch/aw-watcher-window/pull/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, https://github.com/ActivityWatch/activitywatch/issues/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 /

0reactions
TheKnarfcommented, Apr 16, 2020

Decompiling printAppTitle.scpt by downloading it and running osadecompile printAppTitle.scpt reveals that the code is as following:

global frontApp, frontAppName, windowTitle

set windowTitle to ""
tell application "System Events"
	set frontApp to first application process whose frontmost is true
	set frontAppName to name of frontApp
	tell process frontAppName
		try
			tell (1st window whose value of attribute "AXMain" is true)
				set windowTitle to value of attribute "AXTitle"
			end tell
		end try
	end tell
end tell

do shell script "echo " & "\"\\\"" & frontAppName & "\\\",\\\"" & windowTitle & "\\\"\""

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 application "System Events" like that, as I got a bunch of popups when first installing the program where it wanted to control “System Events”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

7 macOS Mojave Slow Performance Issues (How to Fix Them)
Is your Mac running slow or facing performance issues after updating to macOS Mojave? Here are some possible causes and fixes.
Read more >
Is Mojave Slowing Down Your Mac? Speed It Up with These ...
Apps Performing Poorly : A leading reason for poor app performance is out-of-date apps that need to be updated to run smoothly with...
Read more >
Laggy, frozen, slow Mojave: 100% consiste…
1. Attempt to copy a corrupted file. The copy op lags, then halts, while the Mac slows, then freezes. Eventually, Finder throws a...
Read more >
macOS 10.14 Mojave - how is the performance on your ...
For lag, smoothness, etc on supported Macs. I hope this will encourage people to post freely. Anyone know how it is on 2012...
Read more >
13 quick fixes to macOS Mojave problems - MacPaw
Outdated cache files, redundant support files, and logs generated by all your apps can slow even a powerful Mac down to a crawl....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found