App card optimization issues in Android

Source: Internet
Author: User
The so-called app-Dayton Cause is the drop-frame at run time, and possibly the UI thread being blocked. First of all, the drop frame phenomenon, Android every 16ms will be a rendering of the interface, if the app's drawing, calculation and so on more than 16ms so can only wait for the next 16ms to render, this has dropped frame phenomenon.

Causes of the phone lag:
1, the layout is too complex: The XML layout file may have deep nesting or too many components;

2, repeat drawing: a certain point of an interface may be drawn multiple times at the same time;

3, Memory Jitter: System memory is limited, the system will often put inactive processes into the external memory is often said that the virtual memory, when calling it from external memory to memory, memory external memory conversion frequency too large will lead to memory jitter;

4, Performance bottleneck: too many tasks and the execution of scheduling is not good enough;

5, the history asks the reason, the old code as well as the design question;

6, many team members, there are too many code merging and inserting problems;

7, individual programmer's slag code

The optimal solution for the lag:
1, reduce the complexity of the layout;

2, single-threaded task not too much;

3, appropriate scheduling;

4, share some calculations with the server side.

App card optimization issues in Android

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.