KM Engine is Slow to Load on Fast Mac. Connection to Stream Deck USB Keys?

Lately, When I startup my 2018 MacBook Pro i9 32gb Ram / Mojave 10.14.6, KM takes a very long time to load. I have it set to launch engine at login. For minutes, the menu icon is missing. Even my CleanMyMac X warns of a unresponsive program. Then eventually it shows up and all is good. Any ideas what is taking so long to start?

I only have 16 macros enabled. 12 which are waiting for Stream Deck USB keys, that will send MIDI CC information. Since Keyboard Maestro is creating a MIDI device, does that take longer to startup?

@EnjoyRC, I hope you don't mind that I have revised your topic title to better reflect the question you have asked.

FROM:
Slow startup on MacBook Pro?

TO:
Slow Mac Startup When KM Macros Trigger With Stream Deck USB Keys

This will greatly help you attract more experienced users to help solve your problem, and will help future readers find your question, and the solution.

1 Like

The first thing to do is rule out some things. Disable StreamDeck and Keyboard Maestro from launching at boot and see if that makes ant difference. If does, turn them back on one by one.

1 Like

The revamped topic title may be a bit misleading. My Mac boots ultra fast. Within seconds. But after it's up and running, I noticed on the top menu bar that the Keyboard Maestro is a blank spot. (still loading) The CleanMyMac X app even pops up a warning that Keyboard Maestro is unresponsive. But eventually it finishes loading and the icon appears in the top menu bar. I only bring this up because it didn't load this slow before the last update. But then again, I added sending MIDI from a macro recently.

If you have specific indication of some other issue that could affect your Mac, then, yes, we should include it in the Topic Title. However, just saying there is an issue with a MacBook is so broad as to not be really helpful. I think everyone understands that the issue is on a Mac.

It is more likely to be related to a specific version of the macOS, than to a particular Mac model.

So, I'd suggest you follow the suggestion of @Fokke:

To that, I would add to disable all KM Macro Groups that use StreamDeck in any way, and test that configuration.

I disabled both KM and SD. My system loads lightning fast without either one of them.
I enabled only SD. My system loads lightning fast with it.
I enabled only KM. My system loads lightning fast with it, yet it takes a while for KM to show up on the Menu Bar.
My Mac Boot is never slow. That wasn't the point of this thread seeking help.

OK.

So, is this the point?

IOW, it is taking longer than you expect for KM to show in the Apple Menu bar, correct?
And this happens whether or not you have the Stream Deck enabled?

You said in your OP:

Is that correct, or is the only issue that it is taking a few minutes for KM to show in the Apple Menu Bar?

There is another test you can do to determine if it is KM also that is causing the delay in the Menu Bar, or if it is something else:

Restart your Mac in Safe mode
Then launch the KM Engine

  • You can do that by Launching the Keyboard Maestro.app
    OR
  • Use this AppleScript run from the Script Editor
    tell application "Keyboard Maestro Engine" to activate
  • Start your stopwatch when you run the script
  • Let us know how long it takes before KM appears in the Menu Bar
    (when I just tested this, it happened immediately)

I should have worded it:
Lately, When I startup my 2018 MacBook Pro i9 32gb Ram / Mojave 10.14.6, KM takes a very long time to load.

OK, thanks for the clarification.
I have revised your OP to say exactly that, and I have changed the Topic Title to better reflect the issue.

I'd suggest disabling CleanMyMac on login as well, and start KM engine without it.

Ahhh.. good suggestion. I'll try that shortly. Have you seen CleanMyMac X cause any other issues?

Removing CleanMyMac X did not help at all.
Now check this out, All of my configured MIDI Macros were in one Group. I exported that group to a file. Then deleted that Macro Group. Rebooted. And Lightning fast. Instant display of the Keyboard Maestro icon. NO DELAYs at all. I attached my Macro Group.
Live-GP-Stream Deck Macros.kmmacros (38.8 KB)

If MIDI triggered macros are a problem, the likely cause is something sending lots of MIDI packets. Some devices send a continuous stream of MIDI packets, and this will definitely cause problems for Keyboard Maestro with generic MIDI triggers.

It's unlikely to have anything to do with your Stream Deck though.

While troubleshooting this issue, no other MIDI devices or software were sending or receiving any MIDI data. No devices connected to my system. The file I provided shows that I'm simply sending 1 CC message when receiving a Stream Deck key. Very light duty.

I would not attribute slow startup at all to KM. Since I upgraded my mac pro (64GB ram 12 core) to 10.14.6 my startup takes at least a minute without any apps in my login.