Jump to content
Macro Express Forums

Optimization


Linda

Recommended Posts

Hi!

 

I'm wondering if anyone has any thoughts on optimization of ME scripts.

 

As I break more and more short but repetive peices out of the latest batch of legacy macros I am revising, the code is becoming clearer, but it is also taking noticably longer to run. Since these scripts are used interactively to help people with common workflows, ths is a problem. There seems to be a great deal of overhead in calling a new macro, dragging up the cost of what in other languages is good coding practice.

 

Is there a way I can reduce the overhead of macro-to-macro calls, so that I don't have to have gobs of repetitive code to improve preformance?

 

Thanks!

Link to comment
Share on other sites

Yes, that is what I meant.

 

I do not notice any slow downs using the Macro Run command. BUT ... that might be because everything we do here involves the Macro Run command.

 

Have you checked the cache setting (Options | Preferences | Caching)? We set ours to 4,096 ... which is probably overkill.

 

Also, have you attempted to adjust the Macro Priority setting in the Registry? This is accessed via the TweakMe3.mxe utility. Here's a good explanation of it from the Macro Express Explained book:

This integer value specifies how much time that Macro Express is allowed to use your computer's CPU/processor. The allowable range is 0 through 2,147,483,647. The default value is 1,000. Zero turns this feature off, which gives full priority to Macro Express. You will need to enter a "-1" in the dialog to turn it off, which is then converted and stored as a zero. A "1" gives the lowest priority to Macro Express. The higher the number the more priority is given to running your macros and conversely for the lower the number. Experiment with caution!
Link to comment
Share on other sites

Thanks--

 

I'll try setting the cache up. If that doesn't solve the issue, I'll push for the tewakme fix (although I hope that's not neccesary, since requesting the download, install, and configuring of even a tiny application on two dozen users' machines is going to be a beurocratic nightmare :rolleyes: )

 

I think it is a caching issue, simply beause it's slowest the first time I run a macro, or if I come back to a macro after running several others.

 

Cheers.

Link to comment
Share on other sites

I'll push for the tewakme fix (although I hope that's not neccesary, since requesting the download, install, and configuring of even a tiny application on two dozen users' machines is going to be a beurocratic nightmare)

You can equally well create a very small .reg file containing the registry mod required, then either distribute it or perhaps even update your users' registries remotely.

If you need help in constructing the necessary .reg file, let me know.

Link to comment
Share on other sites

TweakMe3 is a playable macro that makes changes to the area of the registry where the Macro Express preferences are saved. Macro Express includes several commands that allow you to write to the registry such as "Write Registry Decimal", "Write Registry Integer" and "Write Registry String".

 

You could write a macro, or modify an existing one, to set the Macro Priority. Some organizations with networks have a shared macro library. That would be an easy way to distribute a macro that adjusts the Macro Priority.

 

To see which registry key and value contain the setting for Macro Priority, I recommend that you download TweakMe3 from www.macros.com/downmore.htm and import it into the macro library on your test or adminstrative computer. Then you can examine it to see how it works. You could even copy certain portions and paste them into a macro that you distribute to the computers on your network.

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...
×
×
  • Create New...