Perhaps you’ve asked yourself if pictures, videos, and words have been showing up more quickly than before inside Facebook’s flagship mobile app. Well, they have been. Today Facebook engineers are talking about the hard work they’ve done recently to speed up rendering for Facebook’s iOS and Android apps.
For the Facebook iOS app, engineers some time ago adopted an image format called Progressive JPEG (PJPEG), Facebook explained today in an engineering blog post. Using the format means downloading several better and better versions of a picture. An iOS device can download and render the first, and lowest-quality, version of an image and then update the image with better versions later. The method replaces a previous rendering model that involved downloading URLs for standard JPEGs and then downloading the JPEGs themselves.
The hack benefits Facebook and end users in multiple ways.
“Using PJPEG, we can show a good image 15 percent faster than before,” Facebook engineering manager Tomer Bar wrote in the blog post. “This image is barely discernible from the full-quality version.”
What’s more, implementing PJPEG means using up 10 percent less data than Facebook for iOS with standard JPEG, Bar wrote.
Meanwhile, on Android, thanks to a rethinking of how content is rendered in News Feed, developers have cut down on the number of out-of-memory errors that users get by 17 percent. Total error count is down by 8 percent.
The hacks suggest a few things: Facebook is keen on ensuring a smooth user experience for mobile users, which presumably could also improve the performance of ads, which generate revenue for Facebook. And beyond that, it looks like Facebook wants to impress mobile developers outside of the company and convey that it’s a place to participate in considerable engineering feats at scale. Or then again, maybe Facebook just wants to brag a little bit.
Check out the blog posts on Android and iOS improvements for the full lowdown.