Developing for a mobile device requires particular attention to performance. Mobile devices have less computing power than desktop systems and are more susceptible to performance bottlenecks.
The Windows Phone SDK comes with a built-in control that allows you to monitor the performance of your app, including frames per second and memory usage.
By default, the frame rate counter is enabled in your app’s App.xaml.cs file if a debugger is attached, as shown in the following excerpt:
if (System.Diagnostics.Debugger.IsAttached)
{
// Display the current frame rate counters.
Application.Current.Host.Settings.EnableFrameRateCounter = true;
...
}
It is possible to enable or disable the frame rate counter programmatically at any time from your app.
The EnableFrameRateCounter
property is somewhat of a misnomer because the control also reports a number of other UI metrics, such as texture memory usage, as shown in Figure 2.3.
Each field is updated periodically while the app is running. Table 2.1 describes each counter field.
Source: MSDN: http://bit.ly/l8i020
The frame rate counter is a valuable tool for identifying performance bottlenecks in your app. For more detailed performance metrics turn to the Application Analysis tool, discussed next.
3.142.199.191