I may have a candidate for you to look at. Unfortunately you have to play a game in order to play it.
I use this macro in the game Elvenar. The macro calls another macro conditional sound
which is there just for debugging. Sound was not enabled.
Get daily gifts.kmmacros (292.3 KB)
Conditional Sound.kmmacros (3.1 KB)
The engine log shows the following:
2022-12-10 08:40:18 Execute macro “Get daily gifts” from trigger Duplicate Macro Palette
2022-12-10 08:41:58 Execute macro “Get daily gifts” from trigger Duplicate Macro Palette
2022-12-10 08:46:16 Execute macro “Get daily gifts” from trigger Duplicate Macro Palette
2022-12-10 08:46:26 Execute macro “Get daily gifts” from trigger Duplicate Macro Palette
2022-12-10 08:46:36 Execute macro “Get daily gifts” from trigger Duplicate Macro Palette
2022-12-10 08:46:44 Execute macro “Get daily gifts” from trigger Duplicate Macro Palette
2022-12-10 08:46:54 Execute macro “Get daily gifts” from trigger Duplicate Macro Palette
2022-12-10 08:47:05 Execute macro “Get daily gifts” from trigger Duplicate Macro Palette
2022-12-10 08:47:15 Execute macro “Get daily gifts” from trigger Duplicate Macro Palette
2022-12-10 08:48:48 Execute macro “Get daily gifts” from trigger Duplicate Macro Palette
This is the full log during this period. So nothing else was executed. And during the same time the memory crontab dump shows:
Sat Dec 10 08:35:00 CET 2022 1670657700 1107844
Sat Dec 10 08:40:00 CET 2022 1670658000 1110656
Sat Dec 10 08:45:00 CET 2022 1670658300 1141924
Sat Dec 10 08:50:00 CET 2022 1670658600 1315096
Sat Dec 10 08:55:00 CET 2022 1670658900 1315144
Sat Dec 10 09:00:00 CET 2022 1670659200 1315332
Sat Dec 10 09:05:00 CET 2022 1670659500 1309272
As you can see the memory usage jumped by 16MB and is never released. Normally I use this macro only a couple of times a day and never within a short time period. I just thought that this could be a suspect because it uses a method to look at images on screen which I use very frequently to automate boring tasks in a browser window. The crontab entry to produce this line is the following:
echo $( date ; date "+%s";ps -axm -o rss,comm | grep "Keyboard Maestro Engine" | cut -d ' ' -f 1 ) 2>&1 >> "~/Library/Logs/Keyboard Maestro/Engine size.log"
as suggested by @Nige_S .
Maybe you already know this but because I look for images all the times the resolution of screen and the browser settings have to match. Maybe this is the time to request a feature improvement. It would be so nice if the images are stored and matched using a normalized PPI dimension.