KM Laggy

If there is a lot of CPU use (by Keyboard Maestro Engine), the cause is usually because Keyboard Maestro is executing macros, usually CPU intensive macros like Screen Image searches or OCR.

If Keyboard Maestro editor is laggy, then the cause can be an excessively large Keyboard Maestro Macros.plist. The macros in Keyboard Maestro are stored in a single large file, so if that file gets large that can slow Keyboard Maestro down. You can see the size of the file by selecting Open Preferences Folder from the Help menu. A few MB is fine. A few GB is not.

Also, every change in one editor window has to be mirrored in any other open editor windows. So having two or more editor windows will generally result in slow performance and should be restricted to when necessary rather than all the time.

Also, if you are editing a large macro with many actions, that can slow things down.

There is a variety of corruptions that could cause problems, including corruptions in system memory, so restarting your Mac is generally a good idea (it's not really useful in general, but you can get corruptions in memory that a clean restart will resolve).

There is no one cause of laggy behaviour, so it is not something I can detect.

You can potentially use Activity Monitor to Sample the Keyboard Maestro editor or engine process (whichever is using CPU or being slow) and that will tell you what it is doing.