Microsoft Dynamics Ax developer's blog

Tuesday, April 11, 2006

Monte Carlo profiling

Axapta profiler is useful, but very slow (it can make your code 30x slower when enabled). So sometimes i use the following trick (it is like Monte Carlo method in math):

  • run the job being profiled

  • break it randomly and go to the debugger to see what is going on (Ctrl+Break then Shift+No)

  • if you break often in some place, it can be hotspot


PS. Maybe, I simply do not know how to deal with profiler well, but it is hard to me to estimate real timing from profiler output. Maybe anybody can provide some tips for this?

2 comments:

Mike Dunlavey said...

At last I have seen that someone else has discovered what I have - that all you really need to find single-thread performance problems is a debugger with a "pause" key. See:

http://en.wikipedia.org/wiki/Talk:Performance_analysis#Monte_Carlo_Profiler.3F

http://en.wikipedia.org/wiki/Performance_analysis#Simple_manual_technique

Max Belugin said...

Thank you for these links