This talk discusses the importance of thinking about performance during development, instead of ignoring it completely with the excuse of "premature optimization."
not the first priority in your application development. Delivering a good user experience and focusing on code maintainability should be among your top priorities. In fact, code optimization should be one of your last priorities, and may not even be part of the process altogether. However, good practices can help you reach an acceptable level of performance without having you go back to your code, asking yourself “what did I do wrong?” and having to spend additional resources to fix it.” - Herve Guihot, Pro Android Apps Performance Optimization
Trade-off on cost - Trade-off on speed of development - Trade-off on performance * Efficient use of resources * Ensuring responsiveness * Not most developers’ favorite
Types / Data Structures * Using Static Members over Member Variables * Using Enhanced for loops - Responsiveness * Lazy Initialization * Background Task * Slow Network Access * Slow File Access
Keep the Main Thread for activity related task UI Rendering, Event Handlers * Spawn Separate Thread for Long Processes - Lack of it leads to Android Not Responding Error * A process is blocked when it exceeds 200 milliseconds on job * Giving the user the chance to kill your application