Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Android Studio Cookbook

You're reading from   Android Studio Cookbook Design, test, and debug your apps using Android Studio

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781785286186
Length 232 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Mike van Drongelen Mike van Drongelen
Author Profile Icon Mike van Drongelen
Mike van Drongelen
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Here comes the bad app – performance improvements


What are the do's and don'ts for Android application development to avoid performance issues, even if they may not occur on your own device? Testing Android apps is hard because there are so many devices out there. It is better to be safe than sorry, so write your code carefully.

Some say that there are two basic rules to writing efficient code: don't do the work that you don't need to do (hence the DRY and YAGNI principles from Chapter 8, Improving Quality) and do not allocate memory if you can avoid it. In addition to this, it is also interesting to know that there are various libraries available that will not just save you the time but also prove to be very efficient. Of course, reinventing the wheel could be error prone as well.

Think of the RetroFit library, for example, that will make it much easier to write code to consume web services, or think of Picasso, an image loading library that will load an image from a URL with just one line...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime