Battery Drain Issue on Facebook for iOS Fixed

Facebook for iOS finally runs without Battery Drain Issues

CPU spin and poorly managed audio sessions were the culprits behind the issue.

Running the Facebook app on iOS devices has been a big problem for the users because as soon as it’s launched, battery starts to drain at a pretty fast pace. This has been an issue for quite some time, but as of today, Facebook has taken care of it.

According to Facebook engineering manager Ari Grant, there were a couple of problems with the Facebook app for iOS. First, it had an issue called ‘CPU spin’ in its code, and the second issue was poorly managed audio sessions. The engineer sheds some light on both of these concerns.

“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.

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.”

Both of these issues have been fixed in the latest version of Facebook, which is now available for download at Apple’s App Store.

 

Image Courtesy: extremetech.com