,

Understanding the Frame Rate Counter

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;
...
}


Note

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.

Image

FIGURE 2.3 The Frame Rate Counter.

Each field is updated periodically while the app is running. Table 2.1 describes each counter field.

TABLE 2.1. Frame Rate Counter Field Descriptions

Image

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.118.210