Profile your windows mobile application
Wednesday, August 6th, 2008This post is aimed to windows mobile developers looking for a profiler for their mobile application. I came across EQATEC profile. This tool is great! You can run it on all .NET apps including .NET CF 2.0 and 3.5. The usage is quite simple:
- Compile your application as usual. If you wish, you can later add profiler-attribute later for fine tuning the profiler.
- Use the profiler to build a profiled version of your application. The profiled assemblies are typically 30% larger than the original and runs 30% slower. I believe that for most apps that is acceptable.
- Deploy the profiled version and run it on your device. Your device doesn’t have to be connected via the ActiveSync for this step. After the application finished, find the report file. Usually, it will be be on ‘Temp’ folder or on SD card if you have one.
- Drag the report file to your desktop, and from there, to the profiler viewer.
- After a few minutes, people around you would probably find you mumbling “OMG, what the…?, I didn’t believe it takes so much time! And why the hell this method is called so many times”.
I found the viewer useful for the following points:
- Find out your bottle-necks methods. This could be methods that takes long time to execute, or relativity fast methods that are called numerous times.
- Find out what happens inside your code. You might realize that you overlooked some calls to method that consumes most of the application time.
- Prioritize your work. The 80-20 rule will work here. You’ll find out that most of the delays are trackable and easy to resolve.
For more information and understanding on how to use the profiler, go to the guide.
BTW, EQATEC also have a tracer tool. However, it is an on-line tool that drastically reduces the performance of your application. For example, the bubbles example application rate was reduced from 54 frames/seconds to 3!