News for hackers. Stuff that matters.
Re:Graphing when your Facebook friends are awake by BinaryIdiot on Thursday February 18, 2016 @11:10PM (#11131476)
> If you reload the page you’ll see approximately fifty-bajillion network requests go off as Facebook desperately tries to load all the junk that it needs to display facebook.com.

I like this part. As a developer I've often looked at the network usage of large websites / web applications and it's always surprising to me just how...unoptimized it is as far as network connections go.

I mean Facebook loads decently enough and all I'm just surprised the first load isn't condensed into a small, handful of network calls to save on latency.

Re:Graphing when your Facebook friends are awake by onewaystreet on Thursday February 18, 2016 @11:37PM (#11131576)
> I like this part. As a developer I've often looked at the network usage of large websites / web applications and it's always surprising to me just how...unoptimized it is as far as network connections go.

Have you considered that your opinion on the best way to serve data to a billion users might actually be wrong? That maybe Facebook actually knows what they are doing?

Re:Graphing when your Facebook friends are awake by jacobolus on Friday February 19, 2016 @03:54AM (#11132419)
Facebook absolutely hammers client-side system resources. Opening a few Facebook tabs, especially in Chrome, will bring a new fancy computer to its knees, and closing Facebook (either the website or the mobile app) famously substantially extends laptop/phone battery life. Facebook’s site architecture demonstrates staggering lack of respect for their users, even without considering the privacy implications.

Not really surprising, from what I’ve heard from friends about their cowboy-style internal engineering culture, and spaghetti piled on spaghetti internal code organization, where shipping new features ASAP is privileged above all other goals.

When you have endless money to throw engineers and servers at a problem, it’s possible to kinda sorta paper over a lot of horrible broken design. Not sure whether that implies anything one way or another about whether or not they “know what they are doing”.

It sort of depends on your definition of “know”. After all, their motto is “move fast and break things.”

Re:Graphing when your Facebook friends are awake by BinaryIdiot on Thursday February 18, 2016 @11:52PM (#11131628)
> Have you considered that your opinion on the best way to serve data to a billion users might actually be wrong? That maybe Facebook actually knows what they are doing?

Certainly! But I've also done work where Humvees in the middle of Iraq use satellite internet connectivity with massive latency and the more connections it has to open to get started the slower everything gets.

Perhaps this is an advantage where latency is low so you can load parts of the page faster but I'd love to know some of the more technical reasons behind this!

Re:Graphing when your Facebook friends are awake by thewarrior on Friday February 19, 2016 @12:25AM (#11131760)
Lets get rid of the notion that Facebook doesn't know what he's doing. He knows exactly what he's doing.
Re:Graphing when your Facebook friends are awake by redthrowaway on Friday February 19, 2016 @03:54AM (#11132420)
I know it's a light-hearted post, but can we not?
Re:Graphing when your Facebook friends are awake by adrianpike on Friday February 19, 2016 @12:59AM (#11131893)
"he"?
Re:Graphing when your Facebook friends are awake by saryant on Friday February 19, 2016 @01:05AM (#11131908)
It's a not-very-funny attempt at a Rubio joke.
Re:Graphing when your Facebook friends are awake by CrystalCuckoo on Friday February 19, 2016 @08:51AM (#11133411)
This is the company that bragged about having 18,000 classes for their iOS app [1] and having to patch the Dalvik Virtual Machine to support new features in their Android app [2]; they are not infallible.

[1] http://quellish.tumblr.com/post/126712999812/how-on-earth-th...

[2] https://www.facebook.com/notes/facebook-engineering/under-th...

Re:Graphing when your Facebook friends are awake by sbd01 on Friday February 19, 2016 @05:30PM (#11137206)
IiRC they aso exploited an Android bug to give themselves more memory. Facebook is woefully buggy and slow that many people are now either using the website or alternative wrapper apps that don't drain their battery immensely.
Re:Graphing when your Facebook friends are awake by grawlinson on Thursday February 18, 2016 @11:32PM (#11131553)
Given the age of Facebook and what you're describing, I can only assume that Facebook have just chucked fifty-bajillion interns (one after the other) at the source and told them to add more crap.

I mean, isn't that how monolithic apps tend to happen? Someone leaves, new person comes along and adds more to the cruft.

Re:Graphing when your Facebook friends are awake by BinaryIdiot on Thursday February 18, 2016 @11:53PM (#11131636)
I mean, honestly, that's almost exactly what they said they do with the mobile app and how it contains so many classes / objects that it's really incredibly the app still works.

But I don't know anyone at Facebook so I have no idea how the website is handled.

Re:Graphing when your Facebook friends are awake by pavs on Friday February 19, 2016 @03:45AM (#11132394)
As someone else have mentioned most of these connections are progressive connection. Another thing to consider is their CDN usage. Facebook uses Akamai as their CDN of choice, most large to medium size telco/ ISP has their own Akamai Cache server at their NOC. So latency is not issue for the big files (images and JavaScript) after the initial reload, assuming they are not cached on the browser already.

So no matter how many connections are made when visiting facebook, it usually loads fairly fast because of aggressive caching and progressive connections. Most of the time the end user shouldn't be able to tell the difference.

Re:Graphing when your Facebook friends are awake by cbhl on Thursday February 18, 2016 @11:29PM (#11131547)
Progressive rendering and lots of small network requests can be good if the user feels its faster.

I suspect their mobile apps are more conservative about using fewer requests (and probably a binary protocol).

Re:Graphing when your Facebook friends are awake by maccard on Friday February 19, 2016 @04:01AM (#11132436)
The Facebook mobile app on iOS is awful - worse than their mobile website. It takes an age to load, drinks battery life, is massive, doesn't contain the messenger functionality (you need another 60MB app for that).
Re:Graphing when your Facebook friends are awake by nommm-nommm on Friday February 19, 2016 @09:05AM (#11133482)
Unlikely. People report that uninstalling Facebook on their phones increases battery life by up to 20%.
Re:Graphing when your Facebook friends are awake by madaxe_again on Friday February 19, 2016 @02:29PM (#11135922)
Don't get me started. The best thing I've ever seen is a site using Google tag manager to load an ad tag manager which loaded a different gtm instance which... Loaded the site's own js libraries.

This horror out of time and space was beaten, shot and stabbed, and the developer responsible for its invention was promoted to CTO and King of the universe.

Re:Graphing when your Facebook friends are awake by simonw on Friday February 19, 2016 @10:58AM (#11134224)
"I mean Facebook loads decently enough and all I'm just surprised the first load isn't condensed into a small, handful of network calls to save on latency."

Actually it is: https://www.facebook.com/notes/facebook-engineering/bigpipe-...

Re:Graphing when your Facebook friends are awake by BinaryIdiot on Sunday February 21, 2016 @02:17AM (#11143656)
> Actually it is: https://www.facebook.com/notes/facebook-engineering/bigpipe-....

Nope. Did you read through how BigPipe works? It's more than a handful; they basically load a whole bunch of mini web pages inside of another. I'm actually impressed they get better performance doing that; I would have thought condensing everything down would net much better performance. It would at least improve latency but I digress.

Re:Graphing when your Facebook friends are awake by Kluny on Friday February 19, 2016 @01:40PM (#11135506)
Yet somehow it's ridiculously fast... like, when I'm waiting for some other site to load, I almost automatically open facebook or hn in another tab, because I know those two sites will load instantly while pretty much everything else on the internet will take a few seconds.
Re:Graphing when your Facebook friends are awake by RussianCow on Friday February 19, 2016 @01:46PM (#11135560)
Really? The notifications and the first story show up fairly quickly for me, but everything else usually takes a few seconds. Certainly not terrible, but I wouldn't call it "ridiculously fast" either.
Re:Graphing when your Facebook friends are awake by Kluny on Friday February 19, 2016 @02:52PM (#11136104)
0.3 seconds for me, just now. HN was 1.3 seconds.
Re:Graphing when your Facebook friends are awake by ewfwrfw on Saturday February 20, 2016 @12:23AM (#11139012)
Really?

FB just took 13 seconds for me to load fully! HN took only a second. I suspect the situation would be way worse if the browser cache was cleared too.