Android memory and performance optimization
Android memory and performance optimization. This tutorial describes how to optimize the usage of memory and optimize your performance in your Android application. The tutorial is based on Android Studio, android studio course 1. Programming tips for providing highly responsive and fast Android applications 1.1. Why you should be careful with Android resources Android devices have less power than standard desktop or notebook computers. For this reason you must be careful with memory consumption. Especially on Android devices before Android 5.0 you want to avoid triggering the garbage collector of the Java virtual machine. This results in a freeze of the Android runtime for about 200 ms. This can be a notable delay, if the user is, for example, scrolling down a list. 1.2. Avoid unnecessary object allocation Avoid creating unnecessary objects, especially in expensive places. Reuse objects if possible. Creating unnecessary objects triggers the garbage ...