Live data from Hacker News

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

engineering.fb.com

181–190 of 333 posts

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

#181
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 would be a big part of this you know:

> [...] We accomplished this by using the native OS wherever possible [...]

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

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

Rumors are the FB iOS app have more lines of code than iOS itself

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

#183
post #120
post #109

Earlier quoted context omitted.

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 ^

Just because there are features that you don't use doesn't make it a problem.

In fact people who like stories and camera effects likely way outnumber the people that don't.

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

#184
post #98

Earlier quoted context omitted.

I'm fairly certain that they also included third-party libraries in that 1.7M.

It seems you are correct: > We also used quite a few of the OS libraries, including the JSON processing library, rather than building and storing our own libraries in the codebase.

Doesn't that mean they're not using third-party libraries?

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

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

Rumors are the FB iOS app have more lines of code than iOS itself

I would not be surprised if this is the case. I am fairly sure the corollary is true: Facebook has more people working on iOS than Apple does.

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

#187
post #89

Earlier quoted context omitted.

WKWebView is out-of-process and has a JIT.

Ah, you're correct - not sure why I thought otherwise, especially when I touch WKWebView pretty often.

Perhaps you confused it with JavaScriptCore?

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

#188
post #7

Considering that they were shipping 18,000 classes in their iOS app back in 2015, a quarter the size of their 2019 app has to be still unreasonably massive. https://gist.github.com/quellish/473f513fbd1310233a8e

The number of classes isn't necessarily indicative of the size or complexity of an app.

Last I heard, Facebook was running into the limits of the Objective-C runtime because they'd register a bunch of classes at startup and overshoot their launch time. They factored a bunch of stuff out into dynamically loaded frameworks off the startup path or something like that.

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

#189
post #45

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?

Man, I hope so. There has beens so much cargo cult built up around React Native that suggesting other approaches is almost guaranteed to kick off many rounds of contentious design meetings. Fortunately, nothing quite takes the wind out of a platform's sails like watching the creator back away from the platform.

And then seeing the rest of the defenders slink back to the shadows. Until the next framework hype cycle comes along...

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

#190

I don't know anyone who uses Messenger, yet, I've heard of people moving to specific countries where it's the de facto and you can't have a social life without it. I'm also aware of how iMessages and SMS are used in the US, yet this is very US-specific, and I don't believe any other country uses SMS. For Chinese people, WeChat is the standard, and what pretty much anyone uses. In Argentina and the Netherlands (and I…

It’s always sobering to remember that we live in bubbles.
Post reply on HN