Android Performance

You can find the corresponding udacity course here.

Table of Contents

  1. Rendering performance
  2. Compute performance
  3. Memory performance
  4. Battery performance

Why performance? Bad performance is the most common cause for bad reviews. Perf matters for usability and user exerience.

Rendering performance

Is the most common issue.

Jank is a dropped frame, when calculations to draw take too long (more than 16ms).

The rentering pipeline goes from CPU to GPU an then to the Screen: The rentering pipeline

Rule of thumb: Get as much data onto the GPU as fast as possible and leave it there without modifying it for as long as possible.

Overdraw Problem

Diagnotstic on mobile device:

  1. Go to Settings > Developer Options
  2. Turn on Debug GPU Overdraw.
  3. In the popup, choose Show overdraw areas.

Now you can see how often you redraw a pixel:

The 2 ways to remove overdraw:

Clipping

Compute performance

Memory performance

Battery performance

Written with in Kiel.