Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Android Studio Cookbook

You're reading from  Android Studio Cookbook

Product type Book
Published in Oct 2015
Publisher
ISBN-13 9781785286186
Pages 232 pages
Edition 1st Edition
Languages
Author (1):
Mike van Drongelen Mike van Drongelen
Profile icon Mike van Drongelen
Toc

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 $15.99/month. Cancel anytime}