Live data from Hacker News

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

engineering.fb.com

91–100 of 333 posts

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

#91
post #47
post #39

Earlier quoted context omitted.

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.

UIWebView was deprecated for years, everyone's had plenty of time to move to WKWebView, and it has nothing to do with React Native to boot. Apple legitimately doesn't seem to care about hybrid frameworks, they've been there since day one. Any time it's seemed like it got difficult Apple has backed down. The lack of JIT in WKWebView is probably the only thing that you could stretch here.

Printing still sucked pretty bad in WKWebView the last time I looked into it (which admittedly has been a year or two, so maybe that's been fixed).

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

#93
post #84
post #75

> We extended SQLite with the capability of stored procedures, allowing Messenger feature developers to write portable, database-oriented business logic I wish the article was a little more fleshed out, I'd be interested in finding out more about how and why they went down this path

I just listened to the Changelog's (a podcast) episode with Richard Hipp, the author of SQLite -- I wonder if he had any part on this extension. But in any case, great to see SQLite thrive.

I did not. This is the first I've heard of it.

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

#94
To me a lot of the new architecture just seems obvious (don't keep the same view 40 times, don't invent your custom app specific everything ...) and I really wonder how the original project could derail that far. Too many resources? Institutional bloat?

That said I find it a bit heart warming that all the major apps are now between 1/2 and 1/4 the size of what they were just a few years ago. I didn't expect the tech companies to ever realize the problem with insane sizes. Is a similar debloating happening to Electron apps?

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

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

I have a set of code I use for my VR projects that I've been iterating on over the last five or so years. It includes a ton of not-VR stuff, too, just stuff that I tend to include in my projects. (aside: and I'm not trying to make it a "framework". It's just my own code and it's only publicly available in the sense that I don't charge for it, don't want to waste a private Github repo on it, and won't stop anyone from using it, but I'm also not going out of my way to teach them how to use it).

THAT code, my "all encompassing, personal repository for every VR app I'd ever make", is only 100K lines of code.

I once downloaded all of my dependencies and counted all of those lines and still only got to 200K. Well, not counting Unity. But at that point, you might as well start counting the LoC of the OS.

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

#96
post #88

Earlier quoted context omitted.

> To rewrite such a large app must have cost a fortune. Going full native is probably going to increase the cost of future development as well. it's a freakin chat app, and it's freaking facebook ! come on, people were doing full rewrites in entirely different languages of software insanely more complex than fb messenger back in the 90s and with near-zero tooling, eg from cobol to pascal to C or similar horrors.

I've built a few "chat apps". I wouldn't discount the complexity. They carry with them a wide array of problem spaces. And of course anything at FB scale user counts is going to be a challenge.

While I have absolutely no doubt there are scalability problems, it seems to me that most of those problems are going to be (or should be) on the back end, not in the client. How is the client 1.7 million lines of code?

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

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

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.

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

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

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

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

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

Sometimes making something simple is harder than making something complex
Post reply on HN