Heading toward the app submission finish line with our new Windows 8 Store App I was wrapping up the remaining functional bugs and we had a moment to breath. Of course with that extra time I started to poke around at performance and asked about our expected usage. They didn’t have an idea so we pull some heavy usage tests out of thin air and threw them at the application. It buckled, taking just over a minute to start the main process after connecting to a server. The Visual Studio tools for profiling and performance analysis are awesome, but were grayed out for my application! I could only do CPU profiling using the build in performance wizard so I started looking elsewhere. Specifically it would not let me do the Visual Studio Performance Wizard for Implementation or Memory profiling. I downloaded every application that was recommended on StackOverflow but SciTech Memory Profiler was what did it for me.
Installation was pretty simple, it integrated right into Visual Studio. I built my application and pulled it up on one window with the profiler on the other. I loved using the real-time profiling, watching the memory usage rise was fun, and disconcerting. I looked through the function calls, seeing where all my time was being used and it ended up being an inefficiency in how I spooled up a pool of WebViews. There was a still a lingering memory leak though, and after a few more hours of digging around I found out I made a very newbie mistake of not removing my event listeners, which prevented old pages from being garbage collected completely.
I could not get the build in Visual Studio tools to provide any of this functionality, so SciTech was a savior in that respect. One improvement I would like to see however is the ability to debug my application from within the Surface Simulator which I couldn’t figure out how to get working.