Tips for lightweight Android Applications
I am starting to develop Android applications and I would like to know if there are any tips for creating lightweight applications. This is my first attempt to write applications on a mobile platform but I 开发者_Python百科hope that my experience in programming will help.
I have in mind the "Better, Faster, Lighter Java" book, but will this be "the" answer to my question? Are there any tips specific for the Android Platform that will allow me to build lightweight applications?
A good place to start would be the Designing for Performance and Designing for Responsiveness documents in the Android Developer Documentation.
Realize that you are coding for a platform with limited memory, so try not to allocate memory unless you absolutely have to. The last thing you want is for the garbage collector to kick in and start eating CPU cycles. Also, quite often "performance" is synonymous with "user experience" so if you have to do anything CPU intensive, do it in the background and out of the UI thread.
Here is some additional information that you might find useful:
- Turbo Charge Your UI
- Coding for Battery Life
精彩评论