Live data from Hacker News

LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

engineering.fb.com

231–240 of 333 posts

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#231
post #85

So, they've reduced 1.7M lines of code to 360K. Let's pause here for a moment: - NumPy is 360K lines mostly C - Postgres is around 2.1M of C - Go 1.13 is around 1.5M of Go code - Rust 1.37 is around 1.2M of Rust code iirc - core llvm is around 3M of C++ iirc ... A chat app is 1.7M. A chat app... Makes me feel sorry for all the time spent/wasted by all those devs, many of whom are unquestionably brilliant and could've…

This "chat app" is used by more than a billion people in the world.

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#232
I wonder what this means for older versions of Messenger? Facebook talks about rewriting their server logic to support all the removed code from the mobile interface, but does this mean that we will soon see support for It's pretty sad that a Messaging app can't be run on a perfectly fine nine year old device. Bring back IRC :)

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#233
post #219
post #76

The loop of app building: 1. Build app with native framework. 2. Re-build app with some alternative framework which is slower, but let's you deploy single code on all platforms. 3. Re-build app with native framework, because it is faster. 4. GOTO 2

From TFA: "We reduced core Messenger code by 84 percent, from more than 1.7M lines to 360,000." Sounds like not only did they make the app quicker and lighter, they improved code maintenance too. If the android app is as the same size as the new ios messenger app, they'd still have less code to maintain than the previous ios messenger app. See also: this other comment - https://news.ycombinator.com/item?id=22468036

I wonder how this will effect Lite. I use it over Messenger strictly to reduce bloat and get an app with the bare essentials of chat and calls fol friends that refuse to use Signal.

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#234

> And yet, for the people using the app, it won’t look or feel much different. Yikes. Okay, I know I'm maybe being a bit unfair here, but I'm sorry to say that this is one of the weakest engineering blog posts I've ever read. This seems to be a massive "let's end the craziness and finally pay our tech debt" effort. Good for them, but not something that excites me about working at Facebook.

Really? I, for one, think it's very important to work somewhere that pays its tech debt on time.

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#235

From https://engineering.fb.com/data-infrastructure/messenger/ : Rather than reinventing the wheel, we used the UI framework available on the device’s native OS to support a wider variety of application feature needs. This reduced not only size, by avoiding the need to cache/load large custom-built frameworks, but also complexity. The native frameworks don’t have to be translated into sub-frameworks. We also used qui…

They make it sound like the clouds parted and a ray of sunshine struck the programmers at Facebook and they realized that they didn't have to ride the framework-go-round to hell. These are supposed to be the smartest people in SV, but from the outside, it strikes me more as a "No shit, Sherlock" moment.

This is more of a “Why are they confessing?” moment.

“They’re not confessing, they’re bragging”

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#237
post #76

The loop of app building: 1. Build app with native framework. 2. Re-build app with some alternative framework which is slower, but let's you deploy single code on all platforms. 3. Re-build app with native framework, because it is faster. 4. GOTO 2

As far as I know messenger was never written in a cross-platform way, neither RN or otherwise.

Is there anywhere that suggets it was ever non native?

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#238

From https://engineering.fb.com/data-infrastructure/messenger/ : Rather than reinventing the wheel, we used the UI framework available on the device’s native OS to support a wider variety of application feature needs. This reduced not only size, by avoiding the need to cache/load large custom-built frameworks, but also complexity. The native frameworks don’t have to be translated into sub-frameworks. We also used qui…

Well, they now have a single-platform application without all the platform-shared code. It's not like there's no tradeoff.

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#239
post #230

Earlier quoted context omitted.

Code wins arguments. FB messenger beats everything, Whatsapp, Wire, Signal, WeChat, Telegram included, in the suckiest network connections.

If FB Messenger beat Whatsapp they wouldn’t have had to buy it.

[deleted]

Re: LightSpeed: Rewriting Messenger’s codebase for a faster, smaller, simpler app

#240
post #172

Earlier quoted context omitted.

What language(s) does Spotify use for the backend? not the website or the mobile clients, but the backend itself.

Mostly Java.... some scala (some teams might use it), and potentially other languages. It built its own api lightweight java framework around 2014-2015 (called Apollo), which is actually pretty decent/nice to work with. There was a lot of protobuf usage early on, but most teams started transitioning to plain json. So, each team runs its own servers, for the features it is developing/maintaining, and most of the api g…

Thanks for the insights.

I can't shake the feeling that the dominating factor in growth of LOC isn't the number of features per se, but the number of features worked on in parallel by separate teams.

Post reply on HN