BT

How to Improve Android App Performance

| by Sergio De Simone Follow 14 Followers on Jun 17, 2015. Estimated reading time: 1 minute |

Performance is key to mobile apps. Google provides a lot of training material to improve performance in Android apps. A brief overview of tips and techniques.

A comprehensive approach to performance entails a ground-up work on aspects such as:

Mastering all this material can be quite daunting, so Shane Conder and Lauren Darcey, authors of several books on Android development, suggest several tips that include:

  • using sound coding practices
  • not using the main thread for blocking operations
  • keeping layouts simple and elegant
  • tailoring resources to devices
  • using traceview and other profiling tools.

Those tips will help you up-front when you are developing your app. What happens when you already have almost finished you app and find that its performance is less than satisfactory? Tutsplus’ Jessica Thornsby identifies three key areas you can easily inspect:

  • overdrawing: this happens every time the GPU paints a background and then some other graphical artifact above it. Too much overdraw can kill an app’s performance. Android supports a “Debug GPU Overdraw” mode that will highlight overdrawn areas by using different colors that show home many times redrawing did happen. So you have a clue at which areas of your layout you should modify.

  • rendering pipeline: the time it takes to render your UI is proportional to the number of view in your hierarchy. Android SDK Hierarchy Viewer, can help inspect a view hierarchy and find ways to flatten it. It also provides profiling information about how long it takes for each view to render.

  • memory leaks: despite being garbage collected, Android is not exempt from memory leaks. Android Memory Monitor, which is built into Android Studio, allows you to check how much memory your app is using. Another tool that can help with memory leaks is the Android Device Monitor’s Heap tab, which provides much more detailed information about which objects are actually taking your device’s memory.

Finally, streamlining an app’s UI is also considered the most important performance tip by Jeannie Liou, who points at the benefits of using a Relative layout instead of a linear layout to organize your views.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Dev Patel by Dev Patel

Really an Informative post and also one thing they should consider which is App load time.

Dev Patel by Dev Patel

Really an Informative post and also one thing they should consider which is App load time.

Dev Patel by Dev Patel

Really an Informative post and also one thing they should consider which is App load time.

Dev Patel by Dev Patel

Really an Informative post and also one thing they should consider which is App load time.

Dev Patel by Dev Patel

Really an Informative post and also one thing they should consider which is App load time.

Dev Patel by Dev Patel

Really an Informative post and also one thing they should consider which is App load time.

Dev Patel by Dev Patel

Really an Informative post and also one thing they should consider which is App load time.

Dev Patel by Dev Patel

Really an Informative post and also one thing they should consider which is App load time.

Dev Patel by Dev Patel

Really an Informative post and also one thing they should consider which is App load time.

Dev Patel by Dev Patel

Really an Informative post and also one thing they should consider which is App load time.

Dev Patel by Dev Patel

Really an Informative post and also one thing they should consider which is App load time.

Dev Patel by Dev Patel

Really an Informative post and also one thing they should consider which is App load time.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

12 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT