3

I have seen the Profile Window in Flash builder, but it shows data only useful for memory profiling. How can we do CPU profiling for applications?

One of my UI operations is very CPU intensive and I need to profile to see which function calls are taking the most CPU cycles. Currently I am unable to find something like that.

Roopesh Shenoy
  • 3,389
  • 1
  • 33
  • 50

3 Answers3

1

Try using Monster Debugger. Its great for runtime debugging and cpu profiling. http://demonsterdebugger.com/ I use it all the time for swfs and air apps.

0

The random-pausing method should find your problem. All it requires is that you have a debugger that you can pause and show stack traces. Flex appears to have such a debugger, fdb.

Community
  • 1
  • 1
Mike Dunlavey
  • 40,059
  • 14
  • 91
  • 135
  • Okay, sounds like a start, I will try it and let you know how it works. – Roopesh Shenoy May 30 '11 at 07:07
  • Although it's not yet released, and when it's done they problem may be already solved or forgotten, you may be interested in the new profiler Adobe is working on. You can see something of it here: http://www.bytearray.org/?p=3151. Also, on the comments there is a link to some other profiler, I don't recall the name right now and cannot access the site tho. – Neverbirth May 30 '11 at 08:23
0

From what I know, that's currently impossible to know because of the abstraction between actionscript and the Flash Player. Best bet would be to have a test run the function a few hundred thousand time and look at the OS' CPU monitor to check how much CPU it uses.

Frankly, I never really do this because I prefer to go over my code and find bottlenecks and improve them. If anything, I do unit tested and check the time it takes, then try to optimize it.

J_A_X
  • 12,857
  • 1
  • 25
  • 31
  • Unfortunately, most of this code is inherited from someone, and I think the bottleneck is in one of the libraries this project is using (open source but again without any tests as such). – Roopesh Shenoy May 30 '11 at 06:38