Facebook Shrinks Messenger App Size Down By 75% (fastcompany.com) 84
To make its iPhone messaging app run better -- especially on older phones -- Facebook rewrote it from the ground up. The new version is going live now. From a report: In August 2011, Facebook introduced Messenger, an iPhone and Android app that spun off the social network's chat feature into a stand-alone experience. [...] Messenger hit one billion monthly active users in 2016 and was the world's most-downloaded app in 2019, according to App Annie. Along the way, it supplemented its original text-based conversations with everything from voice and video calls to games to payments to bots to Snapchat-style stories. As its user base and ambitions grew, so did its size. What had been a wafer-thin 8.5MB download in 2012 expanded to take up 130MB of space on users' iPhones. That's about twice the size of WhatsApp, another Facebook messaging app that offers many similar features.
But now Facebook has put the iOS version of Messenger on an extreme weight-reduction plan. By rewriting it from scratch, it's shrunk Messenger's footprint on your iPhone down to an eminently manageable 30MB, less than a quarter of its peak size. According to the company, the new version loads twice as fast as the one it's replacing. The update is so compact that Facebook was able to quietly build it into the existing version and test it by exposing it to a subset of users. As a giant piece of programming, the downsizing is even more dramatic. Messenger is going from 1.7 million lines of code to 360,000, for an 84% reduction.
But now Facebook has put the iOS version of Messenger on an extreme weight-reduction plan. By rewriting it from scratch, it's shrunk Messenger's footprint on your iPhone down to an eminently manageable 30MB, less than a quarter of its peak size. According to the company, the new version loads twice as fast as the one it's replacing. The update is so compact that Facebook was able to quietly build it into the existing version and test it by exposing it to a subset of users. As a giant piece of programming, the downsizing is even more dramatic. Messenger is going from 1.7 million lines of code to 360,000, for an 84% reduction.
360,000 lines... (Score:4, Insightful)
....to code an instant messaging app. This is how bad the industry has gotten.
Re: 360,000 lines... (Score:2)
Re: 360,000 lines... (Score:4, Interesting)
I remember when you got a whole universe in 32 kilobytes [wikipedia.org].
Re: (Score:2)
I remember when you got a whole universe in 32 kilobytes [wikipedia.org].
Those games were mostly harmless.
Re: (Score:2)
OTOH, the universe has added in capability for a lot of add-on functionality. And they're not lightweight, either.
Re: (Score:2)
Doesn't modern software package everything? For all we know it could be 7.5MB of icons, graphics and sounds and 1MB of code.
Re: (Score:2)
Another thing... assuming they had lots of graphics in the previous version, it could be as simple as someone finally understanding the difference between saving graphics as PNG instead of JPEG.
I can't tell you the number of times I've seen people saving things in the wrong format, inflating the total size of a project while still achieving a lower graphical quality.
I don't know where this "Always save in JPEG, it's the best!!!" bullshit came from, but I wish people learned how things worked.
TL;DR - use JPE
Re: 360,000 lines... (Score:4, Informative)
Or not. It is most likely replacing BOTH JPG and PNG with SVG icons. There is no need to actually store bitmap data in any format, instead just render it on the fly for the given device. With this, there is only 1 file per image, rather than 1 per scale of each image. Plus SVGs are exponentially smaller than their compressed bitmap counterparts.
Re: (Score:2)
Well, it depends on the graphic in question, but yes SVG would be much better for icons. I don't use facebook so I have no idea what kind of graphics are used by that messenger app, but I'm guessing most of them should be icons.
Re: (Score:1)
Re: (Score:2)
... exponentially smaller?
do you even know what that means, or do you just like how it sounds?
Re: (Score:2)
I still remember when I had to develop what was effectively the maths of exponential growth, a good three years before it was covered in maths class. The exercise was to draw a graph of this set of data and then project it forward to the situation when our class became legal adults. The data set was global population estimates from 1800 to 1970. The item that broke through as I was trying to develop w
Re: (Score:2)
I doubt that's the case, becuase it's pretty rare to have an icon that scales down nicely. Most small icons aren't just scaled down versions of large icons. People actually remove features that would be too small to see or that would make the icon too cluttered at lower resolutions.
Re: (Score:2)
I was only trying to explain that an 8.5MB application may not necessarily have 8.5MB of executable code. The space it takes in RAM does not reflect application bloat, otherwise you could say that any OS using free RAM for disk caching would be "a bloated OS", which is not true.
Re: (Score:1)
Re: (Score:2)
The seemingly endless progress of hardware enabled this.
It might be coming to an end.
8 megabytes is more than my entire collection of Commodore 64 software that includes GEOS...
Re:360,000 lines... (Score:4, Insightful)
Your commodore 64 library didn't have to communicate on the internet or care about networked security.
Re:360,000 lines... (Score:4, Insightful)
Or have a "pretty" and responsive touch-GUI. Or live within a half dozen major releases of a fantastically complicated operating system running on a dozen different hardware platforms across 100+ countries.
Re: 360,000 lines... (Score:2)
Re: (Score:1)
Re: (Score:2)
It's so precious that you think Facebook cares about networked security.
Re: (Score:3)
Re: (Score:2)
Re: (Score:2)
Re:360,000 lines... (Score:5, Insightful)
....to code an instant messaging app. This is how bad the industry has gotten.
And it used to be 1.7M lines of code. What was the app doing? It must have been engaged in a lot of spying / malware type behavior to explain that many lines of code.
Re: (Score:1)
Dunno, but the first Linux kernel had about 110,000 lines of code.
Re: (Score:2)
Now it's over half a million [linux.com].
Re:360,000 lines... (Score:4, Funny)
They just offloaded the spyware functionality to the cloud.
Re: (Score:3)
They just offloaded the spyware functionality to the cloud.
Oh, I was thinking maybe they eliminated all the lines which handled encryption and instead are now piping it directly to the NSA - who's helpfully offered to encrypt the messages using their own servers, at no cost to Facebook or the end user!
Re: (Score:2)
If they used libraries and/or frameworks to reduce their own lines-of-code count, the resulting file size would probably not have gone down by as much.
Re: (Score:3)
I think Hanlon's razor [wikipedia.org] can be used here . . . "Never attribute to malice that which can be adequately explained by stupidity"
Re:360,000 lines... (Score:4, Informative)
It must have been engaged in a lot of spying / malware type behavior to explain that many lines of code.
I think it has more to do with the ignorance of users. I mean you do know that the Messenger app included a full embedded image editor, video editor and transcoder, video conference functions, to say nothing of the horrendously shitty real time effects that rely on realtime video analysis to function.
Re: (Score:2)
Or they were importing shloads of huge libraries that they only wanted one method or function from, and the rest sat there like a benign tumor adding weight without value (and possibly adding problems).
Re: (Score:2)
Re: (Score:2)
....to code an instant messaging app. This is how bad the industry has gotten.
This is nothing to do with "how bad" the industry has gotten, but rather how fast hardware has gotten to make the industry lazy. Facebook has always had the ability to make Messenger smaller, but what was the driver for it? The iPhone is hugely powerful. It wasn't a cheap sub-$150 Android device, and for the latter they've always had https://play.google.com/store/... [google.com]
Re: (Score:2)
"....to code an instant messaging app. This is how bad the industry has gotten."
That's 320.000 lines for the spying, the rest is for the messaging.
Re: (Score:2)
This is the ultimate expression of the lazy development pattern of importing huge libraries that have one method you care about and stringing them together.
Android (Score:3)
So where's the reduction for the Android app?
Re: Android (Score:1)
Re: (Score:2)
Android is always more complex. The current app is absolute garbage though.
False. There's nothing complex about Android. In fact Messenger Lite for Android which was released 3 years ago is significantly smaller than even this cut down iPhone version.
Re: (Score:1)
Re: Android (Score:1)
Re:Android (Score:5, Informative)
Re: (Score:2)
So where's the reduction for the Android app?
It has always existed: https://play.google.com/store/... [google.com] It's called Messenger Lite and it's less than 10MB in size. iPhones have always had a minimum high bar for power so there has never been an incentive to cut the code back. Messenger Lite was released 3 years back and targetted a smaller footprint for cheaper Android devices.
Still too big. (Score:2)
Meh (Score:2)
Re: (Score:1)
Yes, another person who boycotts installing this "app" on their phones!
I have to delete podcasts or pictures to install anything, so 30MB is still too big. Especially when I used to be able to do it right from the Facebook app. Or more likely, I just use my laptop in the rare case I get a message.
Re: (Score:2)
I have shit tons of space available on my device, but I just don't want to install their fucking bloated apps that constantly spam notifications at me. I still don't understand why messenger had to be it's own app to begin with, especially when the web app still isn't. All it did was make me have to manage the notification spam in even more places than before, which I did by just uninstalling that garbage and telling everyone to use Hangouts if they want to chat with me.
Re: (Score:1)
Facebook gets no more apps on my phones, ever since they pulled the split of Facebook and Messenger.
Messenger seems to have good devs (Score:5, Interesting)
Say what you want about Facebook, but it sounds like they have really good people working on Messenger. A while back they did a massive migration and wrote an article about how they did it so seemlessly: https://engineering.fb.com/cor... [fb.com]
Re: (Score:2)
The most impressive part is that they managed to do it completely outside the regular migration season.
Customer time's more important than developer time (Score:1)
Most of us have heard the common saying: "programmer time is expensive, hardware is cheap" -- the justification to buy better servers and to buy the developers high-end workstations because developers can get more work done in less time.
Another phrase IMO ought to become commonly understood by businesses: user time is more important than developer time.
Sure programmers are expensive, but users seldom have the fastest mobile devices or workstations and they won't get the same experience as developers.
I don't
It must be a very important data gathering tool (Score:2)
I wish MS would do that with Office (Score:2)
Re: (Score:2)
The new cloud-based office seems to load extraordinarily slowly. Super annoying during bug triage meeting with a dozen people in the room, staring at Excel as it takes 6 seconds to start up and load a spreadsheet.
Re: (Score:2)
Re: (Score:2)
Sheesh, Apple's own Pages opens Word documents (and Numbers opens Excel spreadsheets) much faster than Microsoft's applications.
Macros in Numbers (Score:2)
Apple's own Pages opens Word documents (and Numbers opens Excel spreadsheets) much faster than Microsoft's applications.
But after Numbers has opened a workbook much faster than Excel, how well does it run the macros that are critical to the spreadsheet's function? One example is the product and inventory feed prevalidation tool provided by Amazon to merchants on its platform, which is implemented as macros in an Excel workbook.
FB makes it almost impossible on mobile browser (Score:1)
Efficient spyware (Score:2)
75% fewer lines of code... (Score:2)
I'm curious... (Score:3)
It'd be interesting to know how much of this reduction was by removing super huge libraries of code that you only use one small feature from and implementing it directly.
That's nothing, I shrunk it by 100% (Score:3)
You insensitive clods! (Score:2)
Us boomers can barely see the fonts as it is.
All are bloated (Score:2)
My flashlight app is 659k in Swift. It used to be 80k in Objective C.
What about data storage usage? (Score:2)
AFAIK, all they need to save as non-volatile data is the user token - all the rest should be cache. But almost all of the big apps (GB, Whatsapp, Messenger, etc.) use hundreds of MBs of 'data'
Re: (Score:2)
WhatsApp is storing your conversations locally. Once delivered, messages are not stored in the cloud.
It also caches(?) a lot of data (Score:2)
I had to help some people figuring out where their free space on their minimum spec iPhone went. The Facebook app had a few gigabytes of data stored which also was included as default in the iCloud backup. I am not sure what that were used for.
Re: (Score:2)
Pictures of food or genitalia, or both at the same time?
That's Nothing (Score:2)
still using React? (Score:2)
Android has had this for 3 years now (Score:2)
With the many cheaper under-powered Android phones on the market Facebook has always offered a lite version of Messenger for Android. I highly recommend Android users look at Messenger Lite and Facebook Lite as alternatives to the bloated crap the primary apps are.
Image size... (Score:2)
By rewriting it from scratch, it's shrunk Messenger's footprint on your iPhone down to an eminently manageable 30MB, less than a quarter of its peak size. According to the company, the new version loads twice as fast as the one it's replacing. The update is so compact that Facebook was able to quietly build it into the existing version and test it by exposing it to a subset of users. As a giant piece of programming, the downsizing is even more dramatic. Messenger is going from 1.7 million lines of code to 360,000, for an 84% reduction.
Translation: We found that our designer forgot to shrink the icons and we changed our coding style.
A map of the sky ... (Score:2)
Still bloated ...
When you can have the entire map of the sky in 1.4MB, as in SkEye [google.com], you know what bloat is ...
Use Messenger Lite on Android (Score:2)
Facebook already make an official lightweight version of Messenger on Android called Messenger Lite [google.com], which is less than 10MB.
It is much simpler and should be much more popular with nerds if they are unable to avoid using Messenger!
FB app "temporary" storage black hole (Score:2)
Now if only they'd update the FB app so it doesn't consume all available free space until I have to go help my mom so she can take pictures of her supper for her friends to see again. 6+ GB (however much space is on the iPhone/iPad, actually) of temporary cache that will not go away without deleting and reinstalling the app is a bit much. Why would they not cap this kind of usage, FIFO style?
Clean up (Score:1)
Removing all of the unused framework and unused assets really helps to shrink the size down.
I wonder if tcrf.net would be interested in showing just how much unused bloat was present in the Messanger app, even though tcrf is focused on video games.
84% reduction in lines of code? (Score:1)
1,700,000 - 360,000 = 1,340,000
1,340,000 / 1,700,000 = 0.78823529411
0.78823529411 = 78.8%
No wonder our code is so bloated. We can't do simple math to tell us what percentage of lines we removed.
Re: (Score:2)
Today's update ... (Score:1)
Today's update was 142.6 MB so while a skinny version may be coming it isn't here yet.
I have customers all over the world and use whatever they want. I think I have twelve IM tools on my phone, and as many of those as I can on my computer. For my customer set, What's App is most used followed by Messenger followed by Skype. A little Viber, a little Signal, odds and ends.
Guys, each dating app has its pros and cons (Score:1)