[WM] How to make applications more energy-efficient

Source: Internet
Author: User

Recently, I made some research.ProgramRecord a bit about power consumption. This seems to have been written by an MVP in cnblogs. You can check it out.

Power consumption is actually a performance problem. program optimization is to find the program bottleneck before optimization. the program runs slowly. You can check the profile tool, but the power is really poor. it seems that there are only stupid methods:Contrast TestOnly through comparative experiments can we understand the specific bottleneck of the program and the power consumption of modules.

If there is a way, the rest is the experiment. Find the bottleneck and solve it. I think it should be difficult?

I will introduce some experiences:

1. network devices consume a considerable amount of power. I didn't pay attention to it at first. Later, I found through comparative tests that the network actually consumes the most power. I did nothing to Google and found some data (because I am not engaged in hardware). When the GPRS/1xrtt device is working, the power consumption can reach +. Of course, when sleep is used, the power consumption is very small, negligible. therefore, careful use of the network is the first principle of power saving.

2. Does the gps device consume a lot of power ?? Basically, we can conclude that this is a lie. the comparison results show that GPS devices only consume less power. google's data also has a certain reference value, that is, the operating voltage is 3.7 V, and the operating current is 90 ms. In this case, only 333 mW is available. What's more, some power-saving GPS modules are provided, the operating current is only 45 Ms. in addition, there is a charging process when the gps device is turned on and off. Does this process consume power? The test found that there is basically no power consumption, so we recommend that you disable it when you do not need GPS (the second time, the GPS data is fast ).

3. CPU power consumption. this is hard to determine, because I don't have the ability to turn the CPU only or not ........... some network data shows that the CPU is actually not much power consumption, Cortex-A9 CPU Single Core power consumption will not exceed 300 MW.

4. screen, backlight. I didn't test the backlight, because I haven't figured out any scenario that I need to keep turning the backlight on: P, screen? Keep it on, it means the CPU keeps changing, however, WM has been idling for seven hours, and it is estimated that it will not consume much power.

5. Why does WM power-saving on standby ??

This must be a lie. WM wake-up from sleep is a very power-consuming process. the most open is that our programs wake up WM in a short time, and the power consumption is not as much as we think. however, there is no such problem on the smartphone, because the system will not really wait, but will only turn off the screen.

 

 

Because our program only uses such a few things, and other things have never been used, so we can only write more.

I am not very encouraged to consider power-saving issues when writing a program at the beginning, just like the performance issue when writing a program at the beginning, it will only make the problem more complicated.

In addition, you need to check WM power management, "Windows CE Power Management 3;

To wake up the sleeping operating system, you need to know the APIs of cerunappattime, which are easy to use;

Disconnect the network. The result of my experiment on the Dopod is that the network disconnection is unsuccessful and the dial-up is disconnected again. If the network is disconnected, you need to use RAS. Please refer to here.

 

PS: it is better to teach people to fish than to teach them to fish.

Related Article

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.