21 stories
today

Microsoft offers Metro app developers advice on improving performance

In a new Windows 8 app developer blog post, Microsoft talks about improving performance in Metro styled apps. A tool called “app profiling” is available in Visual Studio 11 that allows an app developer to measure an apps’ perception, tolerance, and responsiveness to ensure it is fast and fluid.

Microsoft believes app performance and being fast and fluid is tied to a user’s experiences, which are placed in three categories. 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,” Microsoft adds. Finally, we have responsiveness, which 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. Yeah, Microsoft is getting a bit Philosophical here.

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. Thankfully there is a great profiling tool available in Visual Studio 11 that you can access on the Windows 8 Consumer Preview,” Microsoft adds.

Microsoft offers these steps in 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.
  • 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.
Further reading: ,