http://my.oschina.net/u/586684/blog/207844
1. use a conservative service
2. free memory When the view becomes hidden :
When a user jumps to a different app and your view is no longer displayed , you should release the resources that the app view occupies. This frees up the resources that can significantly improve the cache processing capacity of the system, and has a direct impact on the user's experience quality.
using the optimized data container:
such as Sparsearray, sparsebooleanarray and longsparsearray. Traditional HashMap The implementation in memory is very inefficient because it needs to establish a mapping relationship in memory for each item in the map. In addition, the Sparsearray class is very efficient because it avoids the need for automatic enclosure (Autobox) key and some values in the system .
use code obfuscation to get rid of unwanted code
The Code obfuscation tool Proguard reduces, optimizes, and confuses your code by removing unused code and renaming classes, fields, and methods through semantic ambiguity. Use it to make your code more concise and a smaller amount of RAM mapped pages.
signing the APK file with the signature tool
If after building the apk you did not do any subsequent processing (including signing according to your certificate), you must run the zipalign tool to re-sign your apk, if not doing so will cause your app to use more memory, Because things like resources are no longer mapped from the APK (mmap).
Note: The Goole Play Store does not accept unsigned apk
Java Performance Tuning
Http://blog.csdn.net/lilu_leo/article/details/8115612#t1%EF%BC%8C%E5%85%B7%E4%BD%93%E5%81%9A%E6%B3%95%E8%AF%B7 %e5%8f%82%e8%80%83%e8%af%a5%e8%bf%9e%e6%8e%a5%ef%bc%89