The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.
Mobile devices are never fast enough. Either they are slow in general (e.g., slow CPU) or they are slow for particular operations (e.g., advanced game graphics).
What you do not want is for your application to be unnecessarily slow, where the user determines what is and is not “necessary”. Your opinion of what is “necessary”, alas, is of secondary importance.
This part of the book will focus on speed, including how you can measure and reduce lag in your applications. First, though, let’s take a look at some of the specific issues surrounding speed.
Understanding this chapter requires that you have read the core chapters and understand how Android apps are set up and operate.
In some cases, you simply cannot seem to get the work done that you want to accomplish. Your database query seems slow. Your encryption algorithm seems slow. Your image processing logic seems slow. And so on.
The limits of the device will certainly make this more of a problem than it might otherwise be. Even a current-era multi-core device will be slow compared to your average notebook or desktop, as mobile CPUs cannot readily be directly compared to desktop and notebook CPUs. Also, this sort of speed issue is pervasive throughout computing, with decades of experience to help developers learn how to write leaner code.
This part of the book will aim to help you identify where the problem spots are, so you know what needs optimization, and then some Android-specific techniques for trying to improve matters.
The preview of this section was abducted by space aliens.
The preview of this section is in an invisible, microscopic font.
The preview of this section is en route to Mars.