Triggers and Actions that could be causing lag (besides search screen for image)?

My mac has been experiencing frequent lags; apps are freezing up randomly (even when I try to keep fewest apps open). At one point I wasn't able to paste anything (the Paste action in menu is disabled for all apps) and lagging was bad, and this was only solved after I quit the KM engine.

Anyway, when I checked my Activity Monitor a few times today, I've noticed KM running at higher CPU than usual -- from 20% up to 50%, and is now often the top 3 CPU-heavy apps on the list. I've checked my macro library to make sure no macro with screen/image-searching action is on. But this is still occurring. So I'm wondering -- other than the image-searching action, what other triggers or macro actions are computationally intensive and may be causing the increased CPU usage?

  • focused window changes trigger?
  • pause until action?
  • anything else?

And I assume there's no way to see the CPU contribution of individual macros?

Thank you!

I use both of those Actions in many of my Macros. I have one macro always active, to do stuff when focused window changes.

I just opened Activity Monitor, and KME was setting at about 0.3% CPU. When I switched windows several times, it popped up to 10%, but then was back to 0.3% within a sec or so.

image

I'm running Keyboard Maestro 8.2.3 (8.2.3) on macOS 10.12.6.
Are you running High Sierra? We've seen some issues with that.

Yes I’m running High Sierra (10.13.6). Is that why? Any knowledge as to how that can be fixed?

Thanks!

Hey @Llama_Lord,

Correct.

Try using this setting in the Keyboard Maestro Editor > General Preferences Pane:

image

That way you know unmistakably when Keyboard Maestro is running something.

Try that for a while and see if you get any clues.

-Chris

Typically triggers, no matter what the trigger is, do not cause any appreciably CPU usage. The triggers are carefully chosen and carefully designed to ensure that. You can have every trigger under the sun and the CPU usage for Keyboard Maestro Engine should remain under 1%.

However running macros are a different matter entirely. If you have running macros, and running macros, then the CPU usage for the engine will increase noticeable, or even a whole lot. So if your triggers are firing or if your macros are running, that will cause CPU usage, and maybe a whole lot of CPU usage depending on the actions in your macro.

Also, if the Keyboard Maestro editor is open, and displaying information which is being updated (eg conditions in actions), then that counts as running a macro.

So start by deselecting all macros in the editor so it is not updating any information. If that does not resolve it, then check what macros are running (either check the Cancel submenu in the Keyboard Maestro status menu, or Start Debugging from status menu) or look in the Engine.log file (Help ➤ Open Logs Folder).

It is likely not Image Searching because that would use more CPU than 20-50% unless it is sporadic image searching, each search for an image only once every second or two or three.