diff options
author | 2016-09-30 22:56:14 +0000 | |
---|---|---|
committer | 2016-09-30 22:56:14 +0000 | |
commit | 69d4a38537faafdb4adfbc31854f079b53db06e7 (patch) | |
tree | 05a8eaf07ca1f75a1dbb11521b181203d679d7a6 | |
parent | 6bc4fe2b86ac1d10684ac541bed3b31af219c584 (diff) | |
parent | 97103d1358bb7c5d6cbb917e26699d0b4f35c932 (diff) |
Docs: Loose ends from release of Performance and Power docs, 2nd iteration. am: 0b611f1cb4 am: f70bbc60b1
am: 97103d1358
Change-Id: Ie0c3a550289165f85d0c80e0097df9c1b105ac06
-rw-r--r-- | docs/html/_redirects.yaml | 4 | ||||
-rw-r--r-- | docs/html/topic/performance/_book.yaml | 40 | ||||
-rw-r--r-- | docs/html/topic/performance/index.jd | 2 | ||||
-rw-r--r-- | docs/html/topic/performance/memory-overview.jd (renamed from docs/html/training/articles/memory-overview.jd) | 9 | ||||
-rw-r--r-- | docs/html/topic/performance/memory.jd (renamed from docs/html/training/articles/memory.jd) | 27 | ||||
-rw-r--r-- | docs/html/topic/performance/rendering/index.jd | 60 | ||||
-rw-r--r-- | docs/html/topic/performance/rendering/optimizing-view-hierarchies.jd (renamed from docs/html/topic/performance/optimizing-view-hierarchies.jd) | 0 | ||||
-rw-r--r-- | docs/html/topic/performance/rendering/overdraw.jd (renamed from docs/html/topic/performance/overdraw.jd) | 0 | ||||
-rw-r--r-- | docs/html/topic/performance/rendering/profile-gpu.jd (renamed from docs/html/topic/performance/profile-gpu.jd) | 0 | ||||
-rw-r--r-- | docs/html/training/_book.yaml | 23 | ||||
-rw-r--r-- | docs/html/training/articles/perf-tips.jd | 6 | ||||
-rw-r--r-- | docs/html/training/best-performance.jd | 7 |
12 files changed, 119 insertions, 59 deletions
diff --git a/docs/html/_redirects.yaml b/docs/html/_redirects.yaml index 8ddb98239038..e71cf2b8d18d 100644 --- a/docs/html/_redirects.yaml +++ b/docs/html/_redirects.yaml @@ -842,6 +842,10 @@ redirects: to: /topic/performance/power/network/gather-data.html - from: /training/performance/battery/network/index.html to: /topic/performance/power/network/index.html +- from: /training/articles/memory.html + to: /topic/performance/memory.html +- from: /topic/performance/optimizing-view-hierarchies.html + to: /topic/performance/rendering/optimizing-view-hierarchies.html # Redirects for the new [dac]/topic/libraries/ area diff --git a/docs/html/topic/performance/_book.yaml b/docs/html/topic/performance/_book.yaml index 6da92796dc9f..ba7c8b54e699 100644 --- a/docs/html/topic/performance/_book.yaml +++ b/docs/html/topic/performance/_book.yaml @@ -8,16 +8,18 @@ toc: - title: Network Use and Battery Consumption path: /topic/performance/power/network/index.html section: + - title: Collecting Network Traffic Data + path: /topic/performance/power/network/gather-data.html - 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 App-Initiated Network Use + path: topic/performance/power/network/action-app-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: @@ -25,21 +27,35 @@ toc: 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: Rendering + path: /topic/performance/rendering/index.html + path_attributes: + - name: description + value: Speed up your app's rendering + section: + - title: Reducing Overdraw + path: /topic/performance/rendering/overdraw.html + - title: Optimizing View Hierarchies + path: /topic/performance/rendering/optimizing-view-hierarchies.html + - title: Using the Profile GPU Tool + path: /topic/performance/rendering/profile-gpu.html - title: Intelligent Job-Scheduling path: /topic/performance/scheduling.html +- title: Background Optimization + path: /topic/performance/background-optimization.html +- title: Reducing APK Size + path: /topic/performance/reduce-apk-size.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 path: /topic/performance/threads.html -- title: Optimizing View Hierarchies - path: /topic/performance/optimizing-view-hierarchies.html -- title: Background Optimization - path: /topic/performance/background-optimization.html -- title: Reducing APK Size - path: /topic/performance/reduce-apk-size.html +- title: Manage Your App's Memory + path: /topic/performance/memory.html +- title: Overview of Memory Managemement + path: /topic/performance/memory-overview.html + path_attributes: + - name: description + value: How to keep your app's memory footprint small in order to improve performance on a variety of mobile devices. + diff --git a/docs/html/topic/performance/index.jd b/docs/html/topic/performance/index.jd index e08db15baa08..2b6b1972a03b 100644 --- a/docs/html/topic/performance/index.jd +++ b/docs/html/topic/performance/index.jd @@ -1,4 +1,4 @@ -page.title=Performance +page.title=Performance and Power page.article=true page.metaDescription=Improve your app's performance by learning how to optimize power consumption, launch times, and other important areas of performance. diff --git a/docs/html/training/articles/memory-overview.jd b/docs/html/topic/performance/memory-overview.jd index f61a230197a0..58067d2be4b8 100644 --- a/docs/html/training/articles/memory-overview.jd +++ b/docs/html/topic/performance/memory-overview.jd @@ -1,11 +1,10 @@ page.title=Overview of Android Memory Management page.tags=ram,memory,paging,mmap -page.article=true -@jd:body +@jd:body -<div id="tb-wrapper"> -<div id="tb"> +<div id="qv-wrapper"> +<div id="qv"> <h2>In this document</h2> <ol class="nolist"> @@ -286,4 +285,4 @@ page.article=true can be killed, see the <a href="{@docRoot}guide/components/processes-and-threads.html">Processes and Threads</a> guide. -</p>
\ No newline at end of file +</p> diff --git a/docs/html/training/articles/memory.jd b/docs/html/topic/performance/memory.jd index 885112168e25..ef1c4ae0aeea 100644 --- a/docs/html/training/articles/memory.jd +++ b/docs/html/topic/performance/memory.jd @@ -1,36 +1,35 @@ page.title=Manage Your App's Memory page.tags=ram,low memory,OutOfMemoryError,onTrimMemory -page.article=true -@jd:body +@jd:body -<div id="tb-wrapper"> -<div id="tb"> +<div id="qv-wrapper"> +<div id="qv"> <h2>In this document</h2> -<ol class="nolist"> +<ol> <li><a href="#monitor">Monitor Available Memory and Memory Usage</a> - <ol> + <ul> <li><a href="#AnalyzeRam">Tools for analyzing RAM usage</a></li> <li><a href="#release">Release memory in response to events</a></li> <li><a href="#CheckHowMuchMemory">Check how much memory you should use</a></li> - </ol> + </ul> </li> - <li><a href="#code">Use More Efficient Code Constructst</a> - <ol> + <li><a href="#code">Use More Efficient Code Constructs</a> + <ul> <li><a href="#Services">Use services sparingly</a></li> <li><a href="#DataContainers">Use optimized data containers</a></li> <li><a href="#Abstractions">Be careful with code abstractions</a></li> <li><a href="#NanoProto">Use nano protobufs for serialized data</a></li> <li><a href="#churn">Avoid memory churn</a></li> - </ol> + </ul> </li> <li><a href="#remove">Remove Memory-Intensive Resources and Libraries</a> - <ol> + <ul> <li><a href="#reduce">Reduce overall APK size</a></li> <li><a href="#DependencyInjection">Avoid dependency injection frameworks</a></li> <li><a href="#ExternalLibs">Be careful about using external libraries</a></li> - </ol> + </ul> </li> </ol> <h2>See Also</h2> @@ -365,8 +364,8 @@ private ActivityManager.MemoryInfo getAvailableMemory() { You should generally avoid use of persistent services because of the on-going demands they place on available memory. Instead, we recommend that you use an alternative implementation - such as {@llink android.app.job.JobScheduler}. For more information about - how to use {@llink android.app.job.JobScheduler} to schedule background + such as {@link android.app.job.JobScheduler}. For more information about + how to use {@link android.app.job.JobScheduler} to schedule background processes, see <a href="/topic/performance/background-optimization.html">Background Optimizations</a>. <p> diff --git a/docs/html/topic/performance/rendering/index.jd b/docs/html/topic/performance/rendering/index.jd new file mode 100644 index 000000000000..e04605cc7eee --- /dev/null +++ b/docs/html/topic/performance/rendering/index.jd @@ -0,0 +1,60 @@ +page.title=Rendering +page.article=true + +page.tags=battery +page.metaDescription=Learn how to optimize your app's rendering performance. + +@jd:body + + +<iframe width="448" height="252" + src="//www.youtube.com/embed/wIy8g8yNhNk?autohide=1&showinfo=0" + frameborder="0" allowfullscreen="" + style="float: right; margin: 0 0 20px 20px;"></iframe> + +<p> + A key aspect of your app that influences your users' perception of quality is + the smoothness with which it renders images and text to the screen. It is + important to avoid jank and sluggish responsiveness when your app is drawing + to the screen. +</p> + +<p> + This section helps you learn several ways to optimize your app's rendering + performance: reducing overdraw, optimizing view hierarchies, and taking + advantage of the Profile GPU tool. +</p> + +<h2>Rendering Actions</h2> + +<dl> + <dt> + <strong><a href="overdraw.html"> + Reducing Overdraw</a></strong> + </dt> + <dd> + Minimize the number of times you app redraws the same pixel in a single + frame. + </dd> + + <dt> + <strong><a href="profile-gpu.html"> + Optimizing View Hierarchies</a></strong> + </dt> + <dd> + Make sure your layout and measurement are executing efficiently, and + avoid double taxation. + </dd> + + + <dt> + <strong><a href="profile-gpu.html"> + Using the Profile GPU Tool</a></strong> + </dt> + <dd> + Take advantage of this on-device tool to identify bottlenecks that + may be slowing your app's rendering down. + </dd> + + +</dl> diff --git a/docs/html/topic/performance/optimizing-view-hierarchies.jd b/docs/html/topic/performance/rendering/optimizing-view-hierarchies.jd index 27d3d163f853..27d3d163f853 100644 --- a/docs/html/topic/performance/optimizing-view-hierarchies.jd +++ b/docs/html/topic/performance/rendering/optimizing-view-hierarchies.jd diff --git a/docs/html/topic/performance/overdraw.jd b/docs/html/topic/performance/rendering/overdraw.jd index c1feff57a26b..c1feff57a26b 100644 --- a/docs/html/topic/performance/overdraw.jd +++ b/docs/html/topic/performance/rendering/overdraw.jd diff --git a/docs/html/topic/performance/profile-gpu.jd b/docs/html/topic/performance/rendering/profile-gpu.jd index 11c38e40783d..11c38e40783d 100644 --- a/docs/html/topic/performance/profile-gpu.jd +++ b/docs/html/topic/performance/rendering/profile-gpu.jd diff --git a/docs/html/training/_book.yaml b/docs/html/training/_book.yaml index e9635be74ec3..fa50aa064204 100644 --- a/docs/html/training/_book.yaml +++ b/docs/html/training/_book.yaml @@ -1242,15 +1242,9 @@ toc: path: /training/scheduling/wakelock.html - title: Scheduling Repeating Alarms path: /training/scheduling/alarms.html - - title: Best Practices for Performance path: /training/best-performance.html section: - - title: Managing Your App's Memory - path: /training/articles/memory.html - path_attributes: - - name: description - value: How to keep your app's memory footprint small in order to improve performance on a variety of mobile devices. - title: Performance Tips path: /training/articles/perf-tips.html path_attributes: @@ -1282,23 +1276,6 @@ toc: - name: description value: How to minimize the amount of power your app requires by adapting to current power conditions and performing power-hungry tasks at proper intervals. section: - - title: Reducing Network Battery Drain - path: /training/performance/battery/network/index.html - section: - - title: Collecting Network Traffic Data - path: /training/performance/battery/network/gather-data.html - - title: Analyzing Network Traffic Data - path: /training/performance/battery/network/analyze-data.html - - title: Optimizing User-Initiated Network Use - path: /training/performance/battery/network/action-user-traffic.html - - title: Optimizing App-Initiated Network Use - path: /training/performance/battery/network/action-app-traffic.html - - title: Optimizing Server-Initiated Network Use - path: /training/performance/battery/network/action-server-traffic.html - - title: Optimizing General Network Use - path: /training/performance/battery/network/action-any-traffic.html - - title: Optimizing for Doze and App Standby - path: /training/monitoring-device-state/doze-standby.html - title: Monitoring the Battery Level and Charging State path: /training/monitoring-device-state/battery-monitoring.html path_attributes: diff --git a/docs/html/training/articles/perf-tips.jd b/docs/html/training/articles/perf-tips.jd index 82de69a55249..30cab14d5da6 100644 --- a/docs/html/training/articles/perf-tips.jd +++ b/docs/html/training/articles/perf-tips.jd @@ -28,7 +28,8 @@ when combined, but it's unlikely that these changes will result in dramatic performance effects. Choosing the right algorithms and data structures should always be your priority, but is outside the scope of this document. You should use the tips in this document as general coding practices that you can incorporate into your habits for general code -efficiency.</p> +efficiency. +</p> <p>There are two basic rules for writing efficient code:</p> <ul> @@ -49,8 +50,7 @@ code for a device with a JIT is not always the best code for a device without.</p> <p>To ensure your app performs well across a wide variety of devices, ensure -your code is efficient at all levels and agressively optimize your performance.</p> - +your code is efficient at all levels and aggressively optimize your performance.</p> <h2 id="ObjectCreation">Avoid Creating Unnecessary Objects</h2> diff --git a/docs/html/training/best-performance.jd b/docs/html/training/best-performance.jd index 8ea6fd5be4e5..bb88e990ce48 100644 --- a/docs/html/training/best-performance.jd +++ b/docs/html/training/best-performance.jd @@ -5,4 +5,9 @@ page.trainingcourse=true <p>These classes and articles help you build an app that's smooth, responsive, -and uses as little battery as possible.</p>
\ No newline at end of file +and uses as little battery as possible.</p> + +<p>Along with this section, you can find additional information about optimizing +your app in the <a href="/topic/performance/index.html">Performance and +Power</a> section.</p> + |