Developers Guide to Improving Performance of Windows 8's Metro Style Apps

In a April 4 post on Windows 8 app developer blog, Microsoft discuss about how to improve performance in your Metro style app? A tool called "app profiling" is available in Visual Studio 11 that you can access on the Windows 8 Consumer Preview, and that allows an app developer to measure an apps' perception, […]

Improving Performance of Metro app

In a April 4 post on Windows 8 app developer blog, Microsoft discuss about how to improve performance in your Metro style app? A tool called "app profiling" is available in Visual Studio 11 that you can access on the Windows 8 Consumer Preview, and that allows an app developer to measure an apps' perception, tolerance, and responsiveness to ensure it is fast and fluid.

Microsoft says that the apps fast and fluid performance is tied to a user's experiences, which are placed in three categories: perception, tolerance, and responsiveness.

In order to measure the apps' perception, tolerance, and responsiveness, the developer should run an app profile. "Profiling provides data on how much time your app is spending in its various functions, so you can see the hot spots where the app is doing most of its work," Microsoft stated.

First, perception dictates how "fast" an app appears to be. A user's perception of how fast an app performs is tied into how much time it took to perform the task within the app.

Secondly, tolerance contributes to both the fast and the fluid of the app's performance. "When a user doesn't know how long an action will take, the wait is painful. Imagine you're using an app to do some photo editing work. When you click to apply a filter, the app becomes unresponsive. The time it spends frozen quickly becomes intolerable, even if it is just for a few seconds," writes Microsoft.

Finally, responsiveness, contributes to the fluid nature of an app. "If tolerance is a measure of the expectations and favorability of time, then responsiveness is the concept that the expectations of time are relative to the activity being performed," Microsoft adds.

Here are the steps Microsoft offers to help testing an apps performance:

  • Make sure the machine is plugged in and not running on battery - many systems operate differently on battery to conserve power.
  • Don't use remote desktop to perform measurements because it can disable hardware acceleration and skew results.
  • Ensure that the total memory utilization on the system is less than 50%. If it's higher, close apps until you reach 50% to make sure you are measuring the true impact of your app and not other processes.
  • To begin profiling your app:
    • Launch your app in Visual Studio.
    • On the Debug menu pick one of the two Performance Analysis options: Start Performance Analysis: Immediately start recording usage info and launch the app. or Start Performance Analysis Paused: Launch the app and later you can resume recording of info. This is used to get the app into a particular state before recording info (such as to test a specific user scenario).
    • After performing the actions you want to measure, go back to Visual Studio and click Stop profiling. This causes VS to generate a report and display key information about the app's activities.
{cf thumbnail=http://farm6.staticflickr.com/5155/7044827857_b6ff0c2601_m.jpg}