--This article is reproduced from the network, the specific source is unknown--
1. With hardware acceleration, application Add android:hardwareaccelerated= "true" in Androidmanifest.xml. But this needs to be used on Android 3.0.
2. Set cache properties in View. Setdrawingcache is true.
3. Optimize your layout. Use the layoutopt command in the Tools directory in the Android SDK to see if your layout needs to be optimized.
4. Load view dynamically. Use Viewstub to avoid some infrequently held views for long-term hold of references.
5. Set the background image of window in acitivity to empty. GetWindow (). setbackgrounddrawable (NULL); The default background for Android is not empty.
6. Use <merge> to optimize the layout layer number. Use <include > to share layouts.
7. View the size of the heap
8. Use TraceView to view trace function calls. Targeted optimization.
9. Use of the cursor. However, be careful to manage the cursor, do not open the cursor every time. It is very time-consuming to turn the cursor on. The cursor.require is used to refresh the cursor.
10. Use ring buffer (can be implemented using linked list data structure). You can set an upper limit on the length of a list, and constantly update the contents of the ring buffer according to the gesture changes.
11. Use Surfaceview to refresh the UI in a child thread, avoiding gesture processing and drawing on the same UI thread (normal view does).
12. Use JNI to place time-consuming processing on a C/C + + layer.
13. Some can use file operations, as far as possible to use file operations, file operations faster than the database operation is about 10 times times faster.
14. Lazy Loading and caching mechanisms. The time-consuming operation to access the network starts a new thread to do instead of the UI thread.
Some ways to optimize "Android" performance