If you've noticed excessive battery drain on your iPhone thanks to the Facebook app, a new update today seeks to remedy at least part of the problem. In addition, Facebook's engineering manager Ari Grant took to a post to explain exactly what's going on, and what Facebook is doing to correct the issue. In today's update, Grant explains that Facebook has addressed a particular issue regarding excessive CPU 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.

A second issue that Facebook is taking a look at has to do with background audio. Specifically, when you close the app after watching a video, the audio session will sometimes stay open, essentially playing silence in the background:

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.

Grant is quick to note that none of the excessive battery drain is due to the app's Location History feature, or anything location-related for that matter. However, today's update does at least address the issues highlighted above, and hopefully we'll see more improvements in future updates.

Source: Ari Grant (Facebook)