From b202c67b00674f151e0a3824d057ee901c61609e Mon Sep 17 00:00:00 2001 From: David Friedman Date: Fri, 2 Sep 2016 11:19:18 -0700 Subject: [PATCH] Docs: New "Power" area for "Performance" section on DAC. Bug: 31314206 Change-Id: I918843bd8b703e2b267d5646658de3599d4ab037 --- docs/html/topic/performance/_book.yaml | 51 +++++++----- docs/html/topic/performance/power/index.jd | 125 +++++++++++++++++++++++++++++ 2 files changed, 156 insertions(+), 20 deletions(-) create mode 100644 docs/html/topic/performance/power/index.jd diff --git a/docs/html/topic/performance/_book.yaml b/docs/html/topic/performance/_book.yaml index e053a2c1bdfe..6da92796dc9f 100644 --- a/docs/html/topic/performance/_book.yaml +++ b/docs/html/topic/performance/_book.yaml @@ -1,25 +1,38 @@ toc: -- title: Reducing Network Battery Drain - path: /topic/performance/power/network/index.html +- title: Optimizing for Battery Life + path: /topic/performance/power/index.html path_attributes: - name: description - value: Access the network while going easy on battery life. + value: Learn to make your app more battery-friendly. section: - - title: Collecting Network Traffic Data - path: /topic/performance/power/network/gather-data.html - - title: Analyzing Network Traffic Data - path: /topic/performance/power/network/analyze-data.html - - title: Optimizing User-Initiated Network Use - path: /topic/performance/power/network/action-user-traffic.html - - title: Optimizing Server-Initiated Network Use - path: /topic/performance/power/network/action-server-traffic.html - - title: Optimizing General Network Use - path: /topic/performance/power/network/action-any-traffic.html -- title: Implementing Doze - path: /training/monitoring-device-state/doze-standby.html - path_attributes: - - name: description - value: Help ensure the device isn't depleting the battery when not in use. + - title: Network Use and Battery Consumption + path: /topic/performance/power/network/index.html + section: + - title: Analyzing Data Traffic + path: /topic/performance/power/network/analyze-data.html + - title: Optimizing User-Initiated Network Use + path: /topic/performance/power/network/action-user-traffic.html + - title: Optimizing Server-Initiated Network Use + path: /topic/performance/power/network/action-server-traffic.html + - title: Optimizing General Network Use + path: /topic/performance/power/network/action-any-traffic.html + - title: Smaller Network Resources + path: /topic/performance/power/smaller-resources.html + - title: Doze and App Standby + path: /training/monitoring-device-state/doze-standby.html + path_attributes: + - name: description + value: Help ensure the device isn't depleting the battery when not in use. + - title: Battery Historian + path: /topic/performance/power/battery-historian.html +- title: Reducing Overdraw + path: /topic/performance/overdraw.html +- title: Using the Profile GPU Tool + path: /topic/performance/profile-gpu.html +- title: Intelligent Job-Scheduling + path: /topic/performance/scheduling.html +- title: Reducing Image Download Sizes + path: /topic/performance/network-xfer.html - title: Launch-Time Performance path: /topic/performance/launch-time.html - title: Better Performance through Threading @@ -28,7 +41,5 @@ toc: path: /topic/performance/optimizing-view-hierarchies.html - title: Background Optimization path: /topic/performance/background-optimization.html -- title: Intelligent Job-Scheduling - path: /topic/performance/scheduling.html - title: Reducing APK Size path: /topic/performance/reduce-apk-size.html diff --git a/docs/html/topic/performance/power/index.jd b/docs/html/topic/performance/power/index.jd new file mode 100644 index 000000000000..88addcea1f71 --- /dev/null +++ b/docs/html/topic/performance/power/index.jd @@ -0,0 +1,125 @@ +page.title=Optimizing for Battery Life +page.metaDescription=Learn how to help your app go easier on the battery. + +meta.tags="performance" +page.tags="performance" + +@jd:body + +
+
+

+ In this document +

+
    +
  1. + Lazy First +
  2. +
  3. + Platform Features +
  4. +
  5. + Tooling +
  6. +
+
+
+ +

Battery life is the single most important aspect of the mobile user +experience. A device without power offers no functionality at all. +For this reason, it is critically important that apps be as respectful of +battery life as possible.

+ +

There are three important things to keep in mind in keeping your app +power-thrifty:

+ + +

Lazy First

+ +

Making your app Lazy First means looking for ways to reduce and optimize +operations that are particularly battery-intensive. The core questions +underpinning Lazy First design are: + +

+ +

+You should ask these questions when it comes to using the CPU, +the radio, and the screen. Lazy First design is often a good way +to tame these battery killers. +

+ +

+To help you achieve these and other efficiencies, the Android platform +provides a number of features to help maximize battery life. +

+ +

Platform Features

+ +

+Broadly speaking, the Android platform provides two categories of help +for you to optimize your app's battery use. First, it provides several +APIs that you can implement in your app. You can learn more about these APIs in +Intelligent Job Scheduling +and +Network Use and Battery Consumption. +

+ +

+There are also internal mechanisms in the platform to help conserve +battery life. While they are not APIs that you implement programmatically, +you should still be aware of them so that your app can leverage them +successfully. For more information, see +Doze and +App Standby.

+ +

+You can get even more benefit out of these features by using the tools +available for the platform to discover the parts of your app that consume +the most power. Finding what to target is a big step toward +successful optimization. +

+ +

Tooling

+ +

There are tools for Android, including +Profile GPU Rendering +and Battery Historian +to help you identify areas that you can optimize for better battery life. +Take advantage of these tools to target areas where you can apply the +principles of Lazy First. +

+ +
+

More resources

+
+
+
-- 2.11.0