Oct 24, 2015

Facebook Explains Why iOS App Drain Battery, And Fixed It


Facebook, one of the worst offenders when it comes to battery drain on iOS devices, claims it has fixed the issue in the latest version of its Facebook iOS app, offering an unusually detailed explanation as to why this happened.

According to Facebook engineering manager Ari Grant, the problem was twofold: First, Facebook’s app had something called “CPU spin” in its code.
“A CPU spin is like a child in a car asking, ‘Are we there yet? Are we there yet? Are we there yet?’ with the question not resulting in any progress to reaching the destination. This repeated processing causes our app to use more battery than intended,” wrote Grant in a public Facebook post.

Second, as suspected by MacStories‘ Federico Viticci, Facebook’s app managed audio sessions poorly, causing unnecessary battery drain.

“If you leave the Facebook app after watching a video, the audio session sometimes stays open as if the app was playing audio silently. (…) The app isn’t actually doing anything while awake in the background, but it does use more battery simply by being awake,” wrote Grant.

Grant also pointed out that the excessive battery drain had nothing to do with how Facebook manages location, as some users have suspected.

The new version of Facebook’s iOS app, available in Apple’s App Store, should be less of a battery hog for your iPhone. Let us know if this is really the case in the comments.

Source: Mashable

No comments:

Post a Comment