Design item Metro App for Windows 8: PERFORMANCE – Lifecycle

This is one of the items that is tested in your Windows 8 App when you use the WACK.

If you are in Southern California, please email these posts for more information on getting a token for your app by June 30, 2012!

 

Optimize your suspend and resume handlers

The suspend and resume PLM events will allow users to switch across tasks and feel like they never have left the app. If you want the task switching to be seamless, you must have suspend & resume event handlers that are optimized to execute promptly. Consider the following optimizations if you want fast suspend and restore:

Save the least amount of data at suspend; any non-transient application state can be saved earlier, as it changes throughout the app
Avoid saving state when no state has changed
Optimize your restore handler to do the least amount of work. Your app is always in memory; if your data has not changed, you might not have a lot of work to do. If your data did change, refresh it in the background, and make sure the app is responsive while you are refreshing it.

References:
Optimizing your app's lifecycle

Reference (HTML)

Optimizing your app's lifecycle

Reference (XAML)

Optimizing your app's lifecycle