,

The Windows Phone Application Analysis Tool

Not only is performance important in ensuring that your app provides an enjoyable experience for your users, but it is also important in a stricter sense: for meeting the certification requirements of the Windows Phone Marketplace. Marketplace certification includes a number of performance related criteria that your app must adhere to. The requirements are as follows:

Image If an application performs an operation that causes the device to appear to be unresponsive for more than 3 seconds, such as downloading data over a network connection, the app must display a visual progress or busy indicator.

Image An app must display the first screen within 5 seconds after launch. You see how to work around this requirement for slow loading apps by creating a splash screen, in Chapter 3, “Understanding the Application Execution Model.”

Image An app must be responsive to user input within 20 seconds after launch.

The Windows Phone Application Analysis tool comes with the Windows Phone SDK and is integrated into Visual Studio, allowing you to analyze and improve the performance of your apps. The tool profiles your app during runtime to gather either execution metrics or memory usage information.

Execution profiling may include method call counts and visual profiling, allowing you to view the frame rate of your app over time, while memory profiling allows you to analyze your app’s memory usage.

To launch the tool select Start Windows Phone Application Analysis from the Debug menu in Visual Studio. You can select the profiling type, along with other advanced metrics, by expanding the Advanced Settings node, as shown in Figure 2.4.

Image

FIGURE 2.4 Configuring the Application Analysis settings.

To begin the profiling session, click the Start Session link.

Whenever the Application Analysis tool runs, it creates a .sap file in the root directory of your project. A .sap file is an XML file that contains the profiling information gathered during a profiling session and can later be opened by the profiling analysis tools built in to Visual Studio.

When done putting your app through its paces, click the End Session link, shown in Figure 2.5. You can, alternatively, use the device’s hardware Back button to end the profiling session.

Image

FIGURE 2.5 Profiling in progress with the Application Analysis tool.


Note

Avoid disconnecting the phone device to end a profiling session, because this can lead to sampling errors. Instead, always use the End Session link or the hardware Back button.


Once stopped, the analysis tool automatically parses the .sap file and presents a summary of the analyzed data. Clicking the Alerts link presents a graph view (see Figure 2.6).

Image

FIGURE 2.6 Viewing performance metrics in the Application Analysis tool.

The .sap file can be reloaded into the analysis tools by double-clicking the .sap file in the Visual Studio Solution Explorer.

Each section of the analysis tools view is discussed in the following sections.

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

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