ScriptSpot

Forum topic · General Scripting

How to determine how fast a script is running? (Profiling)

By knox_12345 · 2009-02-17

Description

Hi,

I have two variations of the script, which does the same job, but in a different way.
I want to check which one actually runs faster.

Is there any way of measuring time using max script?
Even if it's not accurate, it's okay.
I just need a vague sense of which script is running faster.

Thanks.

Comments (3)

martinskinner · 2009-02-17

You could simply add a message box to appear at the end once the script is finished what is was doing.

Apply this to both scripts.

Run each, and as you run them in turn, count in elephants..
"One elephant", "Two elephant"..etc

The one who's message box pops up first is the winner!!

(use a stopwatch if you'd rather not count elephants)

knox_12345 · 2009-02-18

WOW! works like a charm.
Thanks a lot.

Really helpful.