Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Facebook Programming Software

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.

This discussion has been archived. No new comments can be posted.

Facebook Shrinks Messenger App Size Down By 75%

Comments Filter:
  • 360,000 lines... (Score:4, Insightful)

    by 110010001000 ( 697113 ) on Monday March 02, 2020 @02:27PM (#59788636) Homepage Journal

    ....to code an instant messaging app. This is how bad the industry has gotten.

    • And 8 megabytes is wafer thin.
      • Re: 360,000 lines... (Score:4, Interesting)

        by lobiusmoop ( 305328 ) on Monday March 02, 2020 @02:38PM (#59788690) Homepage

        I remember when you got a whole universe in 32 kilobytes [wikipedia.org].

      • Doesn't modern software package everything? For all we know it could be 7.5MB of icons, graphics and sounds and 1MB of code.

        • 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)

            by darkain ( 749283 ) on Monday March 02, 2020 @04:22PM (#59789160) Homepage

            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.

            • 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.

              • I suspect the icons have little to do with it, I mean one can put all the resources packaged in the one app, but why bother with a large file on the appstore? I reckon the app will have a storyboard with little to no graphics embedded in the app itself, but once connected to the internet it will cache up quickly with goodies...
            • by gTsiros ( 205624 )

              ... exponentially smaller?

              do you even know what that means, or do you just like how it sounds?

              • The number of people who use the word "exponentially" without understanding it is increasing exponentially.

                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

            • 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.

    • 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...

    • by jittles ( 1613415 ) on Monday March 02, 2020 @02:41PM (#59788702)

      ....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.

      • Dunno, but the first Linux kernel had about 110,000 lines of code.

      • by Lab Rat Jason ( 2495638 ) on Monday March 02, 2020 @02:45PM (#59788712)

        They just offloaded the spyware functionality to the cloud.

        • 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!

      • 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)

        by thegarbz ( 1787294 ) on Monday March 02, 2020 @04:55PM (#59789308)

        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.

      • 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).

      • Too many developers writing their own features in isolation. Your software always mirrors your org chart.
    • ....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]

    • "....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.

    • 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.

  • by MBGMorden ( 803437 ) on Monday March 02, 2020 @02:27PM (#59788638)

    So where's the reduction for the Android app?

    • Android is always more complex. The current app is absolute garbage though.
      • 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.

        • by Kopp ( 602770 )
          It is smaller but it is lacking quite some functionality, like easily seeing all shared images (when you open one, you cannot swipe to the previous ones) or even sharing / copying some objects... Still better than the bloat of the full version, though
        • If you think creating an app for an OS on 30 different platforms is easier than a single closed OS/platform, you're drunk.
    • Re:Android (Score:5, Informative)

      by twocows ( 1216842 ) on Monday March 02, 2020 @03:44PM (#59788928)
      I don't know about iOS, but on Android, there's already a Messenger Lite. I know this because it's what I use for that platform. I suspect it's already significantly lighter than the original Messenger app.
    • 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.

  • Now, if they shrank it down to 0% I'd be impressed.... /deletefacebook
  • I just use Firefox on iOS to access mobile Facebook which includes Messenger. No "app" needed. (Yes, I know Firefox on iOS is just a reskinned Safari, but it apparently is different enough for Facebook in order not to redirect me to the "app" store)
    • 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.

      • 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.

        • Same here, I've got plenty of space on my phone. Personally, I do not see why I would install any app if the same result can be reached with a responsive (or hell, I'm ok with a dedicated mobile) website.

          Facebook gets no more apps on my phones, ever since they pulled the split of Facebook and Messenger.

  • by joeyadams ( 1724334 ) on Monday March 02, 2020 @02:46PM (#59788720)

    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]

    • The most impressive part is that they managed to do it completely outside the regular migration season.

    • 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

    • The only reason they'd spend so much time on improving an app that people are already addicted to must because it's an important data gathering tool for Facebook. I doubt that there's a single user who cares how long it takes to load. I would imagine most users just leave it running all of the time.
  • I so hated waiting for Word or Powerpoint to load that I stopped using them - I would convert every doc to a PDF, which loads via my Mac's Preview app in one tenth the time of Word. And now I have discovered that Google supports Word format docs, and loads then in one tenth the time! I am never opening Word again!
    • 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.

      • And consider that today's computers are millions of times faster than what we had when Visicalc was created! Something is really wrong...
    • Sheesh, Apple's own Pages opens Word documents (and Numbers opens Excel spreadsheets) much faster than Microsoft's applications.

      • 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.

  • You can use messenger with a mobile browser, but every page reload makes it try to redirect to have you download the app. They really want your phone contact list.
  • Well done! Keep in mind that this is not just a messaging app, it tracks you, data mines your messages, and like other quality rootkits, can do all this even after being deleted.
  • But with all the great taste and privacy violations you love!
  • by the_skywise ( 189793 ) on Monday March 02, 2020 @03:28PM (#59788860)

    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.

  • by rsilvergun ( 571051 ) on Monday March 02, 2020 @03:48PM (#59788944)
    I uninstalled it.
  • Us boomers can barely see the fonts as it is.

  • My flashlight app is 659k in Swift. It used to be 80k in Objective C.

  • What I'd love to know is why these apps need hundreds of MBs of 'data' storage on my devices - not cache, mind you. "Data".
    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'
    • by Dog-Cow ( 21281 )

      WhatsApp is storing your conversations locally. Once delivered, messages are not stored in the cloud.

  • 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.

  • On my phone, I reduced the size of Facebook Messenger down to 0 bytes!
  • I wonder if it still uses React Native or if they moved to a truly native system. Presumably SwiftUI is a bit too unstable for an application like this, but if not, it could explain quite a bit of how this was achieved.
  • 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.

  • 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.

  • 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 ...

  • 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!

  • 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?

  • 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.

  • 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.

  • Comment removed based on user account deletion
  • 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. At the very beginning of using apps, there is a sincere desire to be creative, try to make a good impression. After many attempts, which often result in ignoring by the partner (and this happens often), you will loose your creative. You begin to either act according to the pattern or write immediately about the meeting. Enjoy finding The One with the Lomeda Dating App [google.com], maybe you're lucky to find a soul mate there.

Keep up the good work! But please don't ask me to help.

Working...