Android app CPU consumes too much CPU case

Source: Internet
Author: User

Processing Method-
1. Computer ADB connected devices
2.CMD command: adb shell enters shell mode
Top-h-M 10 prints out the top 10 threads of CPU utilization

3. In the printed thread, find the thread that is relevant to your app, and look at the suspect thread,
Then go into the androidstudio of the Devcemonitor, the specific look at the picture:

4. You will see:

After opening this interface, you should select the process you want to monitor and click on this so that the threads bar on the right will see all the threads of the process.
Remember the suspicious thread ID you found before? Find the corresponding row of data here, select the row, you can see this below:

This is the thread-related code stack.


So you can get into the code to track down the problem.

Does the code have a dead loop? Or did you use a resource that wasn't released? Repeat create? Concrete analysis of specific problems.

Android app CPU consumes too much CPU case

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.