terrypin Posted October 18, 2022 Report Share Posted October 18, 2022 I've used the ultra simple macro below for years. (Usually to remind me - engrossed on PC - to remove tea bag from freshly poured mug of tea.) But I've just noticed this morning that it was consuming over 12% of my CPU. Must be the Delay command. Perhaps since recent update to version 6.4.0.1? Cannot pursue until I get back later home later but meanwhile wonder if one of you could try it please? Tuesday 18 October 2022, 0928. Variable Set Integer %nMinutes%: Prompt Delay: %nDelay% seconds Variable Modify Integer: %nDelay% = %nMinutes% * 60 Delay: %nDelay% seconds Sound File: Alarm-Classic.wav Text Box Display: <VARIABLE SET INTEGER Option="\x01" Destination="%nMinutes%" Prompt="Enter the time delay required in minutes before the alarm should be heard." Mask="FALSE" OnTop="TRUE" Left="Center" Top="Center" Monitor="0"/> <DELAY Flags="\x01" Time="%nDelay%"/> <VARIABLE MODIFY INTEGER Option="\x02" Destination="%nDelay%" Value1="%nMinutes%" Value2="60"/> <DELAY Flags="\x01" Time="%nDelay%"/> <SOUND FILE File="C:\\Users\\terry\\Sounds\\Sound Effects\\Alarm-Classic.wav" Wait="FALSE" _PROMPT="0x0007"/> <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\qc\\b\\f0\\fs58 %nMinutes% mins\\fs16 \r\n\\par \r\n\\par \\fs58 Finished\\b0\\f1\\fs16 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> 1 Quote Link to comment Share on other sites More sharing options...
rberq Posted October 18, 2022 Report Share Posted October 18, 2022 Yes. If I Delay for 30 seconds, it eats 25% of the CPU. If I Delay in two macros running concurrently, it eats 50%. However, if I use the "Timed Delay" option, I see no increase in CPU usage. I assume "Timed Delay" sets an operating system interrupt to "Wake me in 30 seconds", where "Delay" probably is a CPU-intensive loop within ME itself. As advertised, the Delay macro can be cancelled at any time, but Timed Delay can't easily be cancelled until the time expires. Quote Link to comment Share on other sites More sharing options...
terrypin Posted October 18, 2022 Author Report Share Posted October 18, 2022 Thanks, appreciate your taking the time to check. Was that in MX Pro 6.4.01? I'm surprised I haven't noticed this long ago. I was using Timed Delay until recently, but yesterday I set it for a much longer period (40 mins). Frustrated at being unable to run any other macro, so changed it to Delay. May reverse that now. Quote Link to comment Share on other sites More sharing options...
rberq Posted October 18, 2022 Report Share Posted October 18, 2022 My version of ME is 4.9. I don't know why you can't run multiple macros simultaneously -- unless you are using the "lock player" command??? Quote Link to comment Share on other sites More sharing options...
acantor Posted October 18, 2022 Report Share Posted October 18, 2022 I also saw high CPU-usage with the delay, and little (or no) effect with the timed delay. Quote Link to comment Share on other sites More sharing options...
terrypin Posted October 19, 2022 Author Report Share Posted October 19, 2022 14 hours ago, rberq said: My version of ME is 4.9. I don't know why you can't run multiple macros simultaneously -- unless you are using the "lock player" command??? I've investigated and pleased to find that I was mistaken. An untypical situation. I'd set it to 40 mins instead of the regular 2 or 3. (Failure to collect wife from railway station more serious than over-brewing my teabag.) Decided to use the simple macro hotkey instead of editing one of my more complex alarms - the sort we discussed recently. Its reminder message was still running when I returned to PC hours later. Thought I'd confirm my assumption that it didn't prevent other macros working. So ran a simple shortkey macro in my text editor. That failed to type its string. And again. But my conclusion was too hasty. That (and several of my scores of shortkey macros) have occasionally been unreliable before. That was the cause! 😉 Quote Link to comment Share on other sites More sharing options...
terrypin Posted October 19, 2022 Author Report Share Posted October 19, 2022 11 hours ago, acantor said: I also saw high CPU-usage with the delay, and little (or no) effect with the timed delay. Thanks Alan. What version? Any evidence the usage has increased recently? I use a lot of delays (probably more than necessary). Much shorter than that being discussed, of course, but this has me wondering if brief CPU surges could affect other work. Quote Link to comment Share on other sites More sharing options...
acantor Posted October 19, 2022 Report Share Posted October 19, 2022 Hi Terry. I'm using the latest version of Pro, version 6.xx. I haven't checked CPU usage in a long time, so I'm unable report changes. I've used timed delays for eons. I don't remember why or when I stopped using regular delays. My hazy recollection is that they made it harder to abort a running macro, but I can't be sure. Quote Link to comment Share on other sites More sharing options...
rberq Posted October 19, 2022 Report Share Posted October 19, 2022 I tested with my old ME 3 version. Same high CPU. Windows Task Manager shows ME running as a App, and again as a Background Process. The high CPU is reported for the Background process, not for the App. So that's three versions of ME we have seen with the same high CPU -- ME 3 -- ME Pro 4.9 -- ME Pro 6. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.