Fang Talks


This was originally going to be a post about OS X’s Instruments, a built-in profiling tool, but I guess the concept itself is much more useful.

In the world of software development, profiling is the act of looking at your software while it runs and gathering data on performance and anything that relates to it. I’m sure you can see how it’s useful for helping find the slow points in your application, but it can also be used for detecting and tracking down memory leaks for example.

I wasn’t entirely satisfied with the speed at which our school project processed image frames, so I decided to get working on that. No use in just looking at the code and making random changes though, my best bet was to find the slowest running part of the program and see if I could improve that. Luckily I found out OS X has a nifty built-in tool for profiling tasks like that: Instruments.

Launched the tool and set it to keep track of what my application was doing. Let my software process a minute of video footage, and checked the results in Instruments. One specific part of my code was taking up almost 25% of the total execution time! Definitely a hot contender for performance improvements.

Fast-forward a couple hours, and I run the profiler again. This time, that same part of the program took up a mere 12% of the total execution time! A very nice improvement, I’d say.

Granted, I did omit a lot of programming magic from this story, but the profiler was a huge help nonetheless.
~ Fang

Post a comment

Your email will stay hidden, required field are marked with a *.

Experimental anti-spam. You only have to do this once. (Hint: it's "Fang")