Foreword

For the majority of Android Developers out there, the concept of performance is the last thing on their minds. Most app development is a mad sprint towards getting features in, making the UI look perfect, and figuring out a viable monetization strategy. But, application performance is a lot like the plumbing in your house; When it’s working great, no one notices, or thinks about it... but when something’s wrong, suddenly everyone is in trouble.

You see, users notice bad performance before any of the other features in your app. Before your social widgets, awesome image filters, or how one of your supported languages is Klingon. And guess what, users unhappy with performance, give bad reviews at a higher percentage than any other problems in your app.

This is why we say that #PERFMATTERS. It’s easy to lose sight of performance as you’re developing your app, but frankly, it’s involved with everything you do; when users feel bad performance, they complain about bad performance, they uninstall your app, and then vengefully give you a bad review! When you think of it this way, performance sounds more like a feature that you should focus on, rather than a burden you have to put up with.

But in all honesty, improving performance is a really tough thing to do. It’s not enough to understand your algorithm, you need to understand how Android is responding to it, and then how the hardware is responding to Android. The truth is, that one line of code can trash the performance of your entire app, simply because it’s abusing some hardware limitation. But you can’t stop there, because in order to even understand what’s going on under the hood, you have to learn a whole separate set of tools that are built just for performance profiling. Basically, it’s an entirely new way of looking at application development, and it’s not for the faint of heart.

But that’s what’s so great about the book that Doug has put together here. It’s the ‘in the trenches’ guide to everything performance on Android. Not only does it cover the basic algorithm topics, but also goes into how the hardware and platform are working so you can understand what the crazy tools are telling you. This is the type of book that helps to transform an engineer’s perspective of the platform. It stops being about views and event listeners, and slowly grows to an understanding of memory boundaries and threading problems.

When it’s 4am, your app is running poorly, the coffee machine is out, and your startup incubator room smells like cabbage; this is the book you’ll crack open to make sure that 10:00 AM meeting with the Venture Capitalists runs smoothly.
Good luck!
 

—Colt McAnlis, Senior Staff Developer Advocate, Google Inc.Team Lead, Android Performance Patterns - https://goo.gl/4ZJkY1

Get High Performance Android Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.