Early bird prices are coming to an end soon... ⏰ Grab your tickets before January 17

This article was published on November 22, 2019

How Facebook crammed all its major features into a 2MB Lite app


How Facebook crammed all its major features into a 2MB Lite app

Over the past few years, several major mature tech companies including the likes of Google, Uber, Spotify, and Twitter have been courting the ‘next billion users’ – people who are getting online for the first time ever with mobile devices, instead of desktops. Winning over this new audience requires optimizing services and software optimized for conditions prevalent in developing markets, like spotty connectivity, slow internet speeds, and wide proliferation of low-end mobile devices.

Companies started to design a ‘lite’ version of their apps that can run on most phones and don’t take up much space on the device (less than 10MB). The primary reason was that many folks used to uninstall apps to make room for some photos, videos, or music. These apps were also designed to use the minimum amount of data, and even work when network conditions were not ideal. As a result, these companies came up with lite apps that were much smaller and snippier than their main counterparts.

Facebook takes pride in the fact that they were one of the first ones to release a Lite app in 2015. When TNW met the team which is responsible for the development and improvement of the app, it told us how they managed to import almost all features from the main app while keeping the size under two MB.

The history

Initially, when the team was developing the first version of Facebook Lite, the aim was to provide a very basic version of Facebook to users with device, network, and data restrictions. In terms of functionality, the app was limited, and the interface looked like a rudimentary mobile website.

Facebook lite at launch

Tzach Hadar, director of product management for Facebook Lite, said the first version was built around core experience of Facebook with an aim to leave no user behind from using the social network:

The basic premise [of Facebook Lite]  was to leave no one behind. We have a very good high-end app, but some people can’t use it or can’t use it well enough. So we set out with an idea to make an app that works for everyone. We wanted the app to be small and definitely fast. So we booted out any feature that wasn’t required for that.

The term Year-Class scale was defined by Facebook to compare the hardware specs of a phone with a certain year’s high-end phone. As per its definition, a phone released this year can also have a Year-Class of  2017 if its specs are similar to a flagship device from that year.

Facebook said a majority of users in developing countries use phones that are of the Year-Class 2013 or older. The lite team wanted to cater to that audience. 

 

Facebook Lite app over the years

Around 2017, the team changed its approach to the Lite app, as they wanted to give users an ‘uncompromised experience’ without reducing the size. That meant it wanted to give users almost the same feature set as the main app. Over the years, it has introduced features such as live video, reactions, stories, and marketplace.

Hadar mentions in terms of core features, the Lite app is now much closer to the main app. However, if you’re using a Lite app, you might not have some features such as stickers in stories and dating.

The same year, Jio, India’s leading network provider, launched ‘a smart feature phone’ called JioPhone based on KaiOS. In 2018, Facebook shipped an app for that platform based on the Lite app’s architecture.

The technology

To make the app with the smallest size possible, Facebook built a very lean client – the app that resides on your device – and shifted all business logic to its servers. That meant the client had some basic UI elements on the phone, and other content was loaded only when users opened the app.

Dekel Naar, the principal engineer from the Facebook Lite team, said it was important to keep the app size small as it leads to more installations. The company found that with every five bytes reduced on the app they managed to gain and keep one user.

He said before Facebook Lite existed, people used to uninstall the Facebook app because of space constraints on the phone, even if they wanted to use it.

To reduce the app size and keep it in check as the new features pour in, engineers use a pair of bots developed internally called BuildBot and SizeBot. While Buildbot provides information about the size difference between different internal versions of the app, SizeBot notifies a coder how much size a feature is adding when they add it to the app. That helps product managers weed out features that are not high on the priority list.

Naar’s team often proactively takes up projects to manage the app’s size. The team built a special tool called Redex, which is an optimizer for Android files. Facebook used it with another open-sourced optimizer tool called ProGuard to reduce the app’s size by 40 percent and improve its runtime performance by 25 percent. After the success of this project, it even used this tool with its other apps.

Facebook’s internal bot to notify developers of size impact when they add a feature

Facebook Lite also uses the download-on-demand approach to fetch resources like sounds and animations instead of including it into the install package.

Another project the Lite team took up was called the Lean Crash Report. It was targeted towards taking debugging information out of the APK (Application Package) — the file used to install an app on Android phones. The team discovered debugging reports took up almost 15 percent of the APK size. And that’s a lot of space when you’re building a Lite app.

Naar and his team took out the debugging code out of the package and began to store it on the company’s servers. As a result, the company was able to reduce the size of the app by 11 percent.

Thanks to these improvements, the Facebook Lite app is almost 40 times smaller than the main app.

The numbers, reach, and the future

Despite Facebook Lite being a cool product, it’s hard to understand how many people use it. In 2017, Facebook said over 200 million people were using the app monthly. But since then, a lot of things have changed.

App Analytics company SensorTower told TNW Facebook Lite has been downloaded 1 billion times from 2015 to 2019. To put things in perspective, the main app has been downloaded 2.5 billion times in the same time period. This year, Lite has been download 255.1 million times in comparison to 337.5 million downloads of the main app.

The analytics firm also suggests folks from India have downloaded the app the most times followed by Indonesia and Brazil. The Lite team’s challenge is to spread its userbase in sub-Saharan Africa, in addition to the previously mentioned countries.

While the company has historically pre-loaded the main app on many phones, there’s no current partnership to load the Lite app on any low to mid-range phones on the market todayIf anything, there’s a prompt on the social network’s mobile website to encourage visitors to download the Lite app. 

Facebook Lite is perfect for many sets of users including people using high-end phones. It’s great for saving battery life when you’re traveling, and for restricting yourself to just the core functions of the social network without getting sucked in too deep. Facebook is also testing an iOS version in limited markets.

These lite apps might have a smaller user base compared to the main versions as of now. But as more people from countries like India and Brazil get connected to the internet for the first time, they will prefer to have lite apps. Mainly, as they are better than mobile websites or Progressive Web Apps (PWA), and they pack a lot of features from the main app in a smaller package.

Get the TNW newsletter

Get the most important tech news in your inbox each week.

Also tagged with


Published
Back to top