Facebook explains battery drain issues as it updates app to help improve the situation

BY Evan Selleck

Published 22 Oct 2015

Facebook iOS app battery drain

Facebook’s iOS app took some flak recently for putting too much strain on the battery, despite the fact that many users were noticing they weren’t using the app nearly enough to warrant the drain.

As such, on October 15 the company confirmed that they were aware of issues with the battery drain as it pertained to their app, and, as such, were hard at work on getting a fix out there in the world. Unfortunately there wasn’t a timeframe for when that patch would arrive. The first of those endeavors has arrived today, October 22, as the iOS Facebook app receives an update specifically to address battery concerns.

The update is meant to address the first issue that Facebook has discovered, and that has something to do with “CPU spin.” As Facebook’s Ari Grant explained in a detailed post published to the social network, this meant that the Facebook app was requesting the CPU do “something,” whether or not it was actually active and in use:

“The first issue we found was a “CPU spin” in our network 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. The version released today has some improvements that should start making this better.”

There is another issue that’s causing the battery drain, though, and that has to do with audio management. Grant explains in the same post that Facebook’s audio management currently keeps playing audio even if the app is put in the background, as long as that video was playing when the app was active. This essentially means that the Facebook was deploying audio, without it being heard, unchecked:

“The second issue is with how we manage audio sessions. If you leave the Facebook app after watching a video, the audio session sometimes stays open as if the app was playing audio silently. This is similar to when you close a music app and want to keep listening to the music while you do other things, except in this case it was unintentional and nothing kept playing. The app isn’t actually doing anything while awake in the background, but it does use more battery simply by being awake. Our fixes will solve this audio issue and remove background audio completely.”

However, the social network is working on it, and today’s update is just the first in the line of many planned to get this issue fixed. If you have the app installed, check for an update through the iOS App Store.

[via Facebook]