Blog Post

How Facebook classifies thousands of Android phone variants for better performance

As one of the most downloaded and used apps, how does Facebook keep track of the bazillion Android phones it has to support with software? OK, perhaps it’s not a bazillion — more like 10,000, the company says. Still, that’s a daunting number since Android phones have so many variances in screen size, memory capacity, processor performance and network capabilities.

Instead of managing its app updates solely by [company]Google[/company] Android versions, [company]Facebook[/company] has a classification system that lumps devices into capability groups. It doesn’t matter if an Android phone debuted in 2012, for example, if it has many similar attributes to the average or high-end phones that launched in 2010, according to Facebook’s “year class” system.

facebook year class

In a Facebook engineering blog post published Thursday, the company explained:

Year class allows teams to think about a handful of segments of the Android population, rather than every individual device. Using year class in conjunction with screen resolution, we can break down metrics to make decisions about why behavior shifts on different devices – is it performance, screen real estate, or something else? While the Android OS version is still useful for reliability and crash benchmarks, we’ve found year class to give us a much more accurate portrayal of how performance and behavior can vary between different devices.

In addition to analyzing data by year class, we are using it to roll out new product features. Using year class we shipped a better commenting UI to 2012 year class or better phones high-end devices while we worked to optimize it on older models.

It’s a clever way to manage the myriad of Android hardware the company is trying to support through a single app.

The technique takes regional information into account as well: In areas where 3G or LTE signals aren’t readily available or have congested networks, Facebook developers have tuned the app to scale down to 2G EDGE connection as needed. By bringing this type of smarts to its app, Facebook can manage the user experience across devices, networks and countries in order to bring the best performance and features that phones in the area can handle.

Clearly, this is much less of an issue for [company]Apple[/company] iOS devices from a hardware perspective since there are few fewer variants when it comes to iPhones and iPads. However, even iOS device owners can benefit from the regional and network optimizations. All in all, it’s a smart approach to managing the Facebook user experience, regardless of where you use the app.

One Response to “How Facebook classifies thousands of Android phone variants for better performance”

  1. zigurd-mednieks-1

    Android provides a lot of measurements of device capacity and capabilities. But I seldom see more than three different strategies embodied in an app’s implementation (and preferably in resources, not Java code) , and usually keyed off screen geometry. There are some specialized app categories like multimedia that need to pay attention to fine-grained differences. But if you’ve got more than a handful of significant variants of behavior, odds are you’ve created bugs, not benefits.