Live data from Hacker News

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

engineering.fb.com

111–120 of 333 posts

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

#111

Earlier quoted context omitted.

It's a chat app that works very well even on the crappiest connections. If it having 1.7M lines of code indicates anything it is that creating a "simple app that provides simple functionality over a network well" is hard . Look at the garbage generated by Google - text messages and images on Google hangout are not guaranteed to arrive in order ( or even be sent in order ) unless you are on a great network.

Ordering messages and providing reliability does not require 1.7M lines of code.

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

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

#112
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…

While I understand the sentiment, you are making an assumption here that all messenger is a chat app. It seems excessive ( and it is ), but you don't know what kind of heavy lifting is being done under the hood.

I am not really defending it, but number of code lines alone is not a good way to evaluate code.

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

#113
post #18

Not sure how much impact this will have, most of the people I know and have discussed this with fall into two camps: people who use FB a lot an will put up with a bad mobile client, and people who don't want FB on their phone, ever. I have to go years back to think of someone who told me they just couldn't take the bad UX of the clients so they deleted it.

It's probably not meant for us, but instead the third world phones where they've gotten to the point that it might not even install on a large part of their user base. Like I've heard from peace corps folk about how a large part of the third world thinks of messenger as "the internet", which is absolutely terrifying.

As someone with a modern smartphone I'm a huge fan of these lite apps.

Spotify lite, for example, has all the features, a better (!) UI (with material ripples) and everything loads about twice as fast.

Every app should be a lite app. Devs, please start giving a shit about performance.

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

#114

Earlier quoted context omitted.

It's a chat app that works very well even on the crappiest connections. If it having 1.7M lines of code indicates anything it is that creating a "simple app that provides simple functionality over a network well" is hard . Look at the garbage generated by Google - text messages and images on Google hangout are not guaranteed to arrive in order ( or even be sent in order ) unless you are on a great network.

> It's a chat app that works very well even on the crappiest connections Does it? I routinely use Telegram, Line and Messenger. Messenger is without contest the one that gives the most trouble. I've been using chat apps at least since ICQ (1996) and sometimes I feel the user experience has declined. That being said, I'm sure that a lot of progress have been made and that there's a lot going on behind Messenger in ter…

In my experience in places where connectivity sucks (barely able to get data handoffs between stations, sticky wifi, etc) messenger kicks ass while the other applications hick-up big time.

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

#115
post #52
post #32

Earlier quoted context omitted.

Right, but if Messenger is not using Electron why is this related?

All of those are chat apps.

And bloated. And using web technology. Wonder whether those are related.

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

#116
post #80

Earlier quoted context omitted.

React Native isn't necessarily a great fit for something that is intended to be "a simple, lightweight utility" - there is a reasonable start up overhead, for example, with RN, and it also involves bundling quite a few libraries and dependencies. That doesn't mean React Native is not a good fit for any kind of application - for many kinds of apps, start up time and app size are a much smaller issue - but seems Facebo…

React Native (or any framework) isn’t good when you can literally afford billions of dollars of R&D given the financial value of the app. Just like the Mars rovers don’t run Python but it is a great language for a experimental SaaS app testing a new market, RN is great for a team of 3 engineers to get a multi platform app shipped, but not a great choice for an app worth ~$100 billion to its parent company.

Exactly. The point of using a cross platform solution is because you can't afford to make an app for each platform.

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

#117
post #51

Earlier quoted context omitted.

Have you seen how much memory and CPU time Signal uses on the Desktop? Or Slack? The era of running a chat app for almost no resources is gone unless you're an IRC holdout.

Or Telegram.

i use telegram web and it is awesome. Messenger web just sucks, i don't why actually, maybe it is because of the design. I have not checked the others (signal, wechat).

tl;dr web clients are probably more performant than their electron counterpart

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

#118
post #39

From: https://engineering.fb.com/data-infrastructure/messenger/ > We accomplished this by using the native OS wherever possible Does this mean this application does not use React Native?

Yeah, that's how I am reading that. Given the headaches caused by Apple finally barring UIWebView (the basis of frameworks like Cordova) from new App Store submissions beginning in April, I'm not surprised FB would do this. There is plenty of rumor-mongering that Apple is going to make it increasingly difficult for apps based on hybrid frameworks through the submission process.

React Native doesn't use a webview.

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

#119

Earlier quoted context omitted.

I think they went through a period (or still are, I honestly moved over to messenger lite a couple months into it) where they were seemingly intent on making messenger the WeChat of the west. It got real chunky real quick. It was around the same time everyone was excited about conversational ui and Microsoft announced their bot framework. It may have been slow and bulky before that, but that's when I started to notic…

They were trying to make it the WeChat of the non china east and africa, not the west. And they've been pretty successful at that, "messenger" is almost synonymous with "Internet" in some parts.

definitely. Facebook is the internet in my home country. But still lots of Messenger features were not used. So still bloated. Not that anybody complained or moved away from it.

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

#120
post #109
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…

Honestly, a chat app that 1 billion+ use per month that includes payments, camera effects, extensive social integrations, stories, GIFs, reactions, games, polls, voice recording, calling, video chat, and works across all mobile platforms, with nine years of technical debt, that thousands of developers build simultaneously seems WAY more complicated to me than any of your examples. Messenger may not have "HN clout" bu…

> that includes payments, camera effects, extensive social integrations, stories, GIFs, reactions, games, polls, voice recording, calling, video chat

To be fair, this is part of the problem ^

Post reply on HN