robbiehanson / XMPPFramework

An XMPP Framework in Objective-C for Mac and iOS
Other
5.91k stars 2.09k forks source link

High overhead energy #994

Open rikoap opened 6 years ago

rikoap commented 6 years ago

I created simple app using XMPPFramework 3.7.0. The app connect to the server, logged in as a user, then standby (no interaction from user). However the energy impact looks like image below. The overhead is more than 90%. What is cause the overhead high?

screen shot 2017-11-08 at 10 02 24 am
reidnez commented 6 years ago

The part on the left-hand side is total energy usage, which is low. The part that you're looking at is the percentage of total energy usage accounted for by one thing or another.

It makes perfect sense that overhead accounts for most of the usage in an idle state...it takes some amount of juice to keep the CPU, radios, etc. running even when they're not "doing" much. A car idling at a stoplight burns fuel at a relatively low rate, but what it does burn is mostly "overhead" (keeping the engine running) since, by definition, none of it is causing the car to move.

rikoap commented 6 years ago

@reidnez If the logged in user receive message, the energy impact will be High. Is it still make sense?