views:

38

answers:

2

I've been looking for a took or a method of benchmarking as2 code specifically individual functions. I've looked at Grant Skinners Performance Test which is for as3 so it does me no good. Does anyone know of an as2 version or a good way to time functions?

Thanks in advance!

A: 

hum,

did you try ASProf?

http://www.nochump.com/asprof/

not sure if it gives this kind of information. But it is a Flash MX Profiler, I used it a long time ago.

should work according to the features

Túlio Caraciolo
A: 

What i do is that i add debug-calls from each function. In the debug-function i would then measure the time since the last call to the debug, adding this time as a string to the start of the string-to-trace like this:

[ - ] entering for loop [ 4ms ] exiting for loop

Then you spray and pray with traces, finding pieces of code that run slowly, which would be anything above 1ms/call.

Combine this with grouping/analyzing traces per frame, and you have suddenly a very powerful tool at your hands.

Flashjonas