Facebook’s newest iOS update, released yesterday, fixes a major battery draining bug that some Facebook users have been experiencing in recent weeks. Affected users were seeing large amounts of battery drain on their iPhones due to Facebook running in the background, something that happened even when background app refresh was toggled off in the Settings app.
While the latest Facebook app release notes don’t include a reference to the issue, Facebook engineering manager Ari Grant wrote a post explaining the issues behind the battery drain and what Facebook has done to fix it. According to Grant, there were several factors that contributed to the problem, including a “CPU spin” in the network code and silent background audio sessions that kept the app awake even when it wasn’t open.
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.
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.
Following in the footsteps of Google Now, Apple’s Siri, and Microsoft’s Cortana, Facebook has launched its own virtual personal assistant, simply named M. M is being baked into the company’s Messenger app, and, unlike its competitors, is powered not just by technology, but by real people.
A team of employees, dubbed M trainers, will work alongside the software to ensure that every request is answered. The idea is to go beyond the likes of Siri and Cortana, and offer a true personal assistant experience, allowing users to do things like have gifts delivered, book restaurants, and make travel arrangements.
Currently, M is entirely text based. The few hundred users in the Bay Area who have been given access to the app can tap a new button in Messenger to send a request directly to M, at which point either software completes it, or a human does. Users won’t directly know whether it was a computer or a person that helped them.