Macro Runs Slow – Locks Up When Active in the Keyboard Maestro Editor

I have be having an issue with a single macro that captures some values off a web page adds them to variables and then overwrites one field on the page with one of the captured values.

Several weeks ago, this macro became incredibly slow. Still functional but incredibly slow. I simply put up with it. However, reading the thread about progress bars inspired me to revisit the macro and maybe alter it so that I can figure out the caused the delay.

I discovered my second point of pain. If I highlight the macro in the editor, Keyboard Maestro and the web browser become unworkable, rotating out and out of lock up with a spinning beach ball. If I click out of the macro, everything calms down and works normally.

So if I use the macro, it functions, but incredibly slowly. If I try to edit macro, both the Keyboard Maestro and Safari take a visit to the beach, until I click out of editing the macro. It does not matter whether the specific web page is active or not.

Pointers, Advice, to help me resolve this would be welcome.

I apologize for quoting the funny guy from "The IT Crowd", but "have you tried turning it off an on again?" In other words, when was the last time you rebooted the KM Engine or MacOS?

MacOS has several processes that are known to hog system resources. Just last week I had a basic MacOS daemon consuming 16GB of RAM. I had to reboot and all was fine.

A friend of mine always used to say to me "did you check the logs?" Well, did you know the KM Engine has a log file and you can open it? Start under the Help Menu of the KM Editor app to find it. If you do this you may find something unexpected in the log that could explain the problem.

These are my initial ideas. If they don't work, we will try something else. Like opening the Debugger and watching what's taking so long.

@Sleepy I restarted twice, without altering the problem. Checking the logs, other than notations that things “took a while,” there were no other entries to indicate what the problem is.

Browser is Safari Version 15.2 (17612.3.6.1.6)
Keyboard Maestro Version 10.0.2
Operating System 12.1

Well, I have to ask another basic question. Have you ever used this action:

image

I'm still concerned about that log file. You said there were notations that things took a while. Are you able to share what those things are?

Do you have any other "utility" programs on your Mac besides KM? Have you installed or uninstalled anything at the time that the symptoms began?

Have you tried booting your Mac in Safe Mode to see if that fixes anything?

Those are my second set of ideas.

@Sleepy The macro does include any delays.

Disabling the macro does not change the behaviour.

The logs don’t appear to when I click into the macro which evokes the slowdown.

Haven’t tried safe mode.

I would paste the macro into this thread if I knew how :slight_smile:

That's good, but I asked a different question, I asked if you had "ever" used a certain action. I'm going to assume the answer is no.

I don't know what you mean by "The logs don’t appear to when I click into the macro which evokes the slowdown." The logs don't appear to what? Are you able to copy/paste some data from the logs which relate to the "notations that things took a while"?

I'm not sure what the answer to my other questions were:

Do you have any other "utility" programs on your Mac besides KM?
Have you installed or uninstalled anything at the time that the symptoms began?

I know pasting a macro can be tricky for new people, but I'm not asking for that yet. I'm just asking basic questions so far.

Hi @FrederickYocum - i had a similar problem not so long ago and I posted this tip which might help you:

That's a great idea to try out.

Back again.

@Sleepy

I have one Macro that uses a delay action in.

I asked if you had "ever" used a certain action. I'm going to assume the answer is no.

Sorry, that should have been "The logs don't appear to change when I click into the macro which evolkes the slow down.

I don't know what you mean by "The logs don’t appear to when I click into the macro which evokes the slowdown."

By utility do you mean something like Alfred (Yes), CleanMyMac (Yes), Gemini (Yes)

Do you have any other "utility" programs on your Mac besides KM?

Nothing sticks out. Because the problem was an inconvience, not a total shutdown, ignored it for a while. I can say for certain what I did or did not install. There is also the issue of upgrades, both to the operating system and to Safari.

Have you installed or uninstalled anything at the time that the symptoms began?

@tiffle Thanks for the suggestion of unticking Evaluate Condition Results. It didn't make a difference.

Last evening I opened the same macro on my Mac at home (I sync my macros). The problem didn't occur. I was able to edit the macro and simplfy it slightly and add Display Progess action. However on return to work (where I actually use the macro) It did not make a difference the problem persists. I have noticed the other macro that also looks for a field value in the browser suffers from the same glitch.

KM_DelayProblem

This is very odd. When you initiate the macro which causes the slowdown, you should definitely see a record of the name of the macro that you triggered.

However something even funnier is happening to me right now. I can't launch the KM Engine. This has never happened before. I have to investigate this before I can help you.

Hope you sort it out!

Wow! I'd tell you to check the logs, try rebooting, ask you what was the last thing you changed or installed that might affect it, but I'm sure you've already thought of that. You could even try reinstalling KM, I think, because it shouldn't affect your existing macros. Like I said, good luck.

Rebooting fixed my KM Engine problem. I suspected it would. But today I've been working on some financial planning, so I haven't been able to do much on this website.

2 Likes