At the time of this writing, the latest official version of Facebook is the 220.127.116.11.68, an APK that, as you can see in APKMirror, occupies exactly 72.73 MB. Given that Facebook is reputed to optimize their applications pretty bad, we cannot help but wonder is that too much? Why does it occupy so much?
To get to the bottom of the matter we have rolled up their hands and put their APK on the stretcher to perform the autopsy. At the end, we decide if fame heavy application is justified or if you are in the normal range for an application of his caliber.
Comparison with other applications
The first and easiest thing to do is compare the size of the Facebook APK with that of other applications. Thus we can see at a glance whether it is above or below the average. For there to be a bit of everything, these are the sizes, from highest to lowest, of ten of the popular Android applications (based on the latest stable version at the time of writing, ARM, Lollipop 5.x if possible And for 320 dpi).
- Facebook: 73.73 MB
- Snapchat : 71.99 MB
- Facebook Messenger: 60.66 MB
- Skype : 38.41 MB
- Twitter : 29.9 MB
- Spotify : 29 MB
- WhatsApp: 26.7 MB
- Google+ : 22.97 MB
- Netflix : 20.39 MB
- Instagram : 18,99 MB
- Pinterest : 13.87 MB
Indeed, the Facebook application seems to be more cumbersome than we are accustomed to on Android. While the average of the above applications is 32.68 MB, Facebook weighs more than twice.
Now, there is nothing like Facebook. This is not an advertising slogan, but the reality that few applications are as complex as Facebook. There are other social networks, yes, but none comes close to having as many subsections and functions as Facebook. For example, Twitter does not have groups or lists of nearby places, and Google+ has no live video streaming.
And if we compare Facebook as the sum of similar applications? Arguably Facebook is like Google+ joined Periscope (Facebook Live Video) Google My Business (Management pages on Facebook) and Timehop (a day like today). The result of adding the size of all these applications together? 22.97 + 10.94 + 17.29 + 9.8 = 61 MB. Or joining four applications you reach the size of Facebook. However, this comparison continues to be more than a curiosity, more or less indicative, but that does not tell us too.
What’s in the APK?
Before continuing it is necessary to mention that in the previous section, for simplicity, we were comparing the size of the APK as such. As you may know, an APK is just a ZIP with files inside, so the actual size of the application and its components will vary depending on how well or poorly the content is compressed.
To continue nuestar research, the next step was obvious, extract the APK and see what keeps Facebook there to fill both. The short answer is “many things”: in its interior are lodged 15,699 files, with an unzipped size of 143 MB. If you want to compare it with Google+, your APK is composed of 2,324 files.
To start analyzing the APK, the easier it is to distinguish, of those 143 MB, what percentage they are resources, i.e. images and sounds. Resources are often the culprits of heavier applications, especially if they have many images or videos. APK resources 25.3 MB Facebook suppose a 17% of the total, which is not bad the truth, but they do not seem the main culprit of overweight.
Here we must recognize some credit to Facebook because most of the images are well optimized and are below the kilobyte in size. The more than 2,500 PNG images included in the Facebook APK barely make up about 7 MB in total, which implies that, on average, each image does not reach 3 KB. There are some exceptions, however, as this PNG image that takes the record with 243 KB (and it’s best we do not know where it is used).
It will not be me who teaches Facebook engineers how to design an application as complicated as Facebook, but from my ignorance this overdose of JS files gives the impression of not being very optimized.
You may also like to read another article on freshlookapp: LinkedIn comes to the pass and denies that your app will stop receiving support in Windows Phone
The DEX files are executable Android in both the acronym it corresponds to Dalvik Executable format. While Google+ has two DEX files, Facebook has no less than thirteen. And each occupies about 8 MB.
You may decompile the DEX files to see what each comes with utilities like Dex Manager, and so I have done for the first two: classes.dex and classes2.dex . However, diving into what really lies behind each one would be a titanic and, in a way, unnecessary task.
With a look at the code within a few DEX it is clear what is the problem of Facebook: it is full of things. To the top. Analytics components, tests AB, photo upload, sync contacts, pages, instant articles, notifications, location and lots, lots and lots of libraries and components.
These DEX files assume 84.3 Total 143 MB, which is 60% of the total. It all helps to create a monster that occupies so much, but now we have already found who takes more than half of the guilt.
Tests and lack of cleaning
One cause of at least part of the overweight of the Facebook application that is usually mentioned are constant tests and tests AB to which the application is submitted. How many times have we come across a feature that is available to some but not to everyone? Well, even if you do not have it activated, your code in the APK installed on your mobile equally, taking up space.
Similarly, frequently it has been blamed Facebook for not doing cleaning application and leave “out there” parts of code that is no longer in use. Thus, various initiatives like FB Patcher managed to activate the messages on Facebook, even if took months off. Given that Facebook does not stop testing this and that, not cleaning the house from time to time is a big problem that is accumulating.
Optimization is not a priority
After looking at the Facebook application and the 72MB + in size of your APK in depth, what have we learned? Is the Facebook application really heavy? The answer is yes, is above average in size application, although in some ways can be excused by the number of components needed to run everything behind this social network and what we often we forgot.
Although we have the impression that Facebook is a social network with a simple and therefore basically displays text and images, the reality is that the application is far more complex than this, with components editing photo and video, broadcast and playback Internet , Support for Chromecast, sync contacts, places on the map, instant articles, statistics, location tracking and a lot etcetera.
All this, combined with the classic slogan Facebook ” Move Fast and Break Things” -which was later softened to “Move Fast With stable Infra” – and makes it clear that the priority of Facebook never been optimize your application or improve it , but be quick to add new features, although not perfect.
There is no time therefore to pass the broom and eliminate the old one, and instead of including in the APK a function to test in a group of users, perhaps three are included. Another example is that Facebook is distributed in a single APK for all DPI available, which will be laziness or not, but means that the graphics are included to all resolutions, rather than optimized for DPI device.
Google takes some time to make improvements to their applications and Android to achieve reduce the size of them, as you can read in the documentation of Android, but they lack all the algorithms and all information in the world if the priority of Facebook is the to do it quickly , although the result is not the best. More tech reviews on http://what-it-is.com/.