Jump to content
Macro Express Forums

Why high CPU usage?


Recommended Posts

I'm trying (again!) to track down the cause(s) of sluggish performance on this XP Pro PC. Task Mgr shows only 5 processes (apart from System Idle Process, of course) which have anything other than zero in the CPU column. Explorer is up there at 4%, which is getting my main attention, but the other 4 are 1%, and MacExp.exe is one of them. The 50 or so others are all zero and rarely budge from that when I'm not actively 'doing' anything.

 

So the question is: what exactly is ME Pro doing (when no macro is running) that takes a significant amount of CPU resource?

 

The follow-on puzzle is: I ran SysInternals Process Monitor expecting to see hundreds of entries for MacExp.exe. But in some 20,000 lines for the 5-10 seconds I ran, there wasn't a single one.

 

Any thoughts from anyone please?

 

(This is no longer a high end PC, but no slouch either: Quad Core Q9450 2.66 GHz, 4 GB DDR2 667 MHz, 512 MB nVIDIA GeoForce 8800GT)

 

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

MEP is always doing things. In fact I would guess it's probably very active watching system messages, checking timers and schedules, seeing where your mouse is, monitoring the keyboard buffer and seeing if certain keystroke combinations and sequences are appearing. All to see if it needs to activate a macro. So I'm not surprised if it appears as 1%. Watching mine right now it's "00" but that doesn’t means it's not doing things, probably just that it's less than 0.5%. Every once in a while it pops up to 1%. And why do you think 1% is a significant amount of CPU for all this activity?

 

Just because SysInternals doesn't show activity only proves a macro isn't running. It's my understanding that MEP listens to the system messages and such. EG just because you have a macro that is activated by a change in a folder doesn't mean it's constantly getting the properties or file list of that folder. Instead it 'listens' to a Windows message from whatever program that commands the OS to change a file or whatever. This would not appear in SysInternals.

 

BTW make sure you "Show processes from all users".

Link to comment
Share on other sites

  • 2 years later...

The problem: high CPU usage when running timed based macros.

Applies to: both v.3 and v.4

The fix: change the Delay Type (under Set Delay) from the default [Delay in Seconds] to [Timed Delay in Seconds]

 

This issue plagued me for years. I recreated most of my macros in AutoHotkey since it could run the same processes without dragging down the computer. Problem is AutoHotkey lacks the ease of use that is MacroExpress. The fix is to change the Delay Type from the default [Delay in Seconds] to [Timed Delay in Seconds]. Don't know why it makes a difference but a macro that pegged all cores on my 32GB 3.5GHz i7 at over 90% usage will show no CPU usage with the switch.

 

I stumbled across this fix a loooong time ago but being the ass that I am I never shared the info. And, since I haven't see this fix posted elsewhere I'm going to spam it anywhere I see peeps asking about CPU overload.

 

Better late than never...

Link to comment
Share on other sites

There is a downside. If a script gets "stuck" during a timed delay, it may be impossible to break out of it -- except by rebooting the computer. During one macro scripting project, I was forced to switch all timed delays into delays because my computer was hanging several times an hour.

 

I try to avoid delays of any kind -- if I can get away with it.

Link to comment
Share on other sites

@breadbox,

Thanks for the feedback after my 27 month old post!

 

I'm an AHK novice, but have been very pleased with the score or so of scripts I've managed to get running (with great help from the AHK Forum). Both from reliability and speed viewpoints. If only it was anything close to the ease of creation of Macro Express Pro...

 

BTW, did you ever develop any methodical steps to help convert an MEPro macro to an AHK script? I'm no techie or programmer, so I find the commands and syntax a major obstacle.

 

Alan,

Maybe I should retry your approach, but I find that most of my macros benefit from the liberal use of delays, especially after TextTypes (typically 0.1 s). And as I frequently find Wait for WindowTitle unreliable, longish delays get used there too.

 

Terry, East Grinstead, UK

Link to comment
Share on other sites

I started to play with AHK but realized there was a lot to learn as it's not as simple as MEP with it's helpful dialogs. But then I realized VB.NET was just as easy to learn and much more capable and mainstream so I went that way for meaty projects or to extend MEP's capabilities.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...