Making Windows 8 Apps Power Efficient

Windows 8 is going to be released for desktops as well as the portable devices like laptops and tablets as well and the most important part of the portable device is the battery life.So to optimize the usage of the apps on the portable Windows 8 devices so to improve the energy efficiency for the devices is a must.

In a recent post at the Building Windows 8 Blog,Microsoft detailed how they are planning to cope up with the durability requirements and making the  Windows 8 apps energy efficient.

Here’s how they are going to make it work,

Focusing on the Foreground

The app can be in one of the three states

  1. Actively running in the foreground
  2. Suspended in the background
  3. Performing some defined background activity

So it means that when the app is in the foreground it is doing most of the work it is intended to do,or if it’s in the background then the app will either be suspended completely or it can use minimal number of resources to perform some of the background activities like copying of files.

The first state works similar to the existing windows apps,the Metro apps  run and utilize CPU, disk, memory, and other resources as needed.Both in case of single app or in case of two apps are on screen with one of the apps is  ”snapped” to the side.

Image Credits[Microsoft]

The suspended state is somewhat like a “Pause” state means whenever you switch away from an app the O.S Completely suspends it,so the Scheduler does not include the app  in the CPU scheduling,resulting in better battery life for the device.So when the app needed to be in the scheduler again it can be brought to foreground by switching to that app again.

The third state is a scenario focused,making the app able to do the common tasks while it’s running in the background,Here is what they will enable in the background for Metro style apps in WinRT:

  • Playing music
  • Downloading a file from or uploading it to a website
  • Keeping live tiles alive with fresh content
  • Printing
  • Receiving a VoIP call
  • Receiving an instant message
  • Receiving an email
  • Sharing content (like uploading photos to Facebook)
  • Synchronizing content with a tethered device (like syncing photos)

So Microsoft is not leaving any stones unturned as far as the Windows 8 Operating System is Concerned.

Checkout the detailed post for complete description and scenarios based on common patterns used by developers as well as expected patterns by users.