Very High CPU Usage, not using "Find an Image"

I am performing a macro that scrapes multiple pages, after a few pages, the CPU is at very high usage. ( I did not check myself but the fan starts going crazy and I can't check mid-macro ). The web scraping I'm doing is utilizing the components found in this macro.

If I were to guess I'd think the problem is the scrolling action i have in the macro which is needed to force every search result on the page to load.

Could someone provide insight on whether or not this would be the issue and if so what a better scrolling set up would be?

Use the Macro Debugger to see what macros are executing what actions to get a better idea of what Keyboard Maestro is doing at the time.

Note that Keyboard Maestro actions run about every 1ms, so a Pause of anything less than about 0.001 seconds is going to result in 0.001 seconds - Keyboard Maestro is no a CPU, it is not executing millions or billions of instructions a second.

I'm not sure what the Set Variable to Calculation action is doing, but if it is just incrementing ScrollCount then the entire sequence is just equivalent to:

  • Repeat 250 times
    • Pause 0.001 seconds
    • Scroll Wheel Down 20
  • Optionally Set Variable ScrollCount to 250

Potentially (but unlikely) that would use a lot of CPU depending on what you are scrolling, but it would be more likely the target application than Keyboard Maestro using the CPU.

Why do you have the Pause in the scroll loop set to such a very small number (essentially zero):
image

After each scroll you need to wait for the web server to respond with providing more content to the browser. So, I'd suggest a Pause of about 0.1 sec.

Thanks guys, you are correct that it wasn't keyboard maestro taking up the CPU it was Google Chrome Helper which was being forced too much. Decreasing the scroll time to .01 seemed to help a lot.