Live data from Hacker News

Ask HN: Why and how is Hacker News so fast?

news.ycombinator.com

61–70 of 110 posts

Re: Ask HN: Why and how is Hacker News so fast?

#61
It's fast because everything is text based. Very little CSS. Very few files to download.

The language which generates the page is irrelevant, when the page you're viewing changes rarely (doesn't change from user to user). It's very cacheable which means you might just be loading a static file served by a regular web server. Combine that with the above, and you get your answer.

Compare this to http://qbixstaging.com/Groups, what do you see?

Re: Ask HN: Why and how is Hacker News so fast?

#62

Not pulling in a ton of external javascript, images, and ads is probably the biggest, but one thing that helps is that most comment threads have a relatively low number of comments. This page currently only pulls down down 12KB (compressed to 3.75KB). A thread like https://news.ycombinator.com/item?id=9976298 with ~600 comments pulls down 785KB (compressed to 143KB) In general, looking at the network tab in the devel…

Can someone buy the .text TLD already and make a whole part of the internet where this approach is standard?

Or, even better, mandatory.

Re: Ask HN: Why and how is Hacker News so fast?

#63

Loading this webpage I downloaded ~12KB. For comparison, I went to the NYT homepage and downloaded ~1.2 MB. For people with shitty downlinks like you and I, the absence of exorbitant quantities of Javascript and images makes a lot of difference - a lot more than time-to-first-byte.

Or for a bigger offender, I noticed a couple of days ago that Rally (https://www.rallydev.com/) loaded over 5 MB of JavaScript from 3 scripts...being loaded 3+ times each (each one is over 600 KB)! Each script seemed to contain their own copy of ExtJS. Each script returns a 200, and doesn't use a 304 either on each load :( .

Re: Ask HN: Why and how is Hacker News so fast?

#64
post #45

It's relatively straightforward. Take a look at what Pingdom tells you it does when the site loads: http://tools.pingdom.com/fpt/#!/cnYAuq/https://news.ycombina... 5 requests, Total size 12.6kB, total time 661ms. 1 request for the content, 1 for css, and then 3 gifs, all from a single domain (so just one DNS request). If you look at the profile, 47% of the time was spent doing that one DNS lookup, so subsequent reque…

Might be able to get that down to 5 requests if they use .pngs instead of .gifs and throw them into a sprite sheet.

You can also have gif spritesheets.

Re: Ask HN: Why and how is Hacker News so fast?

#66
post #59
post #18

If you want to see an even faster "forum", see http://forum.dlang.org/

I have been puzzled by this being said about dlang forever and today about HN. These sites are certainly not noticeably slow, but I don't notice anything remarkably fast about them either. Am I not visiting enough of the slow sites ? My working hypothesis is that I don't have a good understanding of web-development to appreciate the nuances. Much akin to me listening to Indian classical music, Jazz: I would often enc…

> Am I not visiting enough of the slow sites?

Do you use NoScript? I feel the same way because I usually run with JS turned off. Most things are pretty zippy despite using a computer from 2009.

Re: Ask HN: Why and how is Hacker News so fast?

#67
post #59
post #18

If you want to see an even faster "forum", see http://forum.dlang.org/

I have been puzzled by this being said about dlang forever and today about HN. These sites are certainly not noticeably slow, but I don't notice anything remarkably fast about them either. Am I not visiting enough of the slow sites ? My working hypothesis is that I don't have a good understanding of web-development to appreciate the nuances. Much akin to me listening to Indian classical music, Jazz: I would often enc…

How fast is your network link, both in terms of throughput and latency for the sites you visit? The OP is browsing over a 256 kbps connection of unknown origin. They are likely impacted by latency and throughput constraints, which will exacerbate issues with sites that require a lot of requests or are resource heavy.

Making a site fast boils down to:

1) Making sure your server responds quickly.

2) Reducing the number of requests required for a page to load.

3) Reducing the number of bytes required for a page to load.

Re: Ask HN: Why and how is Hacker News so fast?

#68
post #57
post #45

It's relatively straightforward. Take a look at what Pingdom tells you it does when the site loads: http://tools.pingdom.com/fpt/#!/cnYAuq/https://news.ycombina... 5 requests, Total size 12.6kB, total time 661ms. 1 request for the content, 1 for css, and then 3 gifs, all from a single domain (so just one DNS request). If you look at the profile, 47% of the time was spent doing that one DNS lookup, so subsequent reque…

"... (so just one DNS request)." Are you sure? request #1 1 news.ycombinator.com: 207 bytes, 1+0+4+2 records, response, noerror query: 1 news.ycombinator.com authority: ycombinator.com 172800 NS ns-225.awsdns-28.com request #2 1 news.ycombinator.com: 225 bytes, 1+1+4+0 records, response, authoritative, noerror query: 1 news.ycombinator.com answer: news.ycombinator.com 300 CNAME news.ycombinator.com.cdn.cloudflare.net…

maybe I should rephrase that as one outbound DNS query? The answer should be cached locally, or at least at your next hop resolver, and the TTL of 300 seconds is long enough to make it effective

Re: Ask HN: Why and how is Hacker News so fast?

#69

For your need to simulate a 256kbps connection, two things have worked for me. Both require a good few mbps connection to begin with though: 1. Use Chrome's device emulator mode. You can ignore all other settings like screen size, user agent, etc. and just use the speed restriction. 2. Use a specialized WiFi router. I use the ones from TP-Link in which I can restrict speed for a particular device IP. DD WRT based rou…

For OS X and iOS users, Apple has a "Network Link Conditioner" utility in the developer tools that can simulate different throughput as well as packet loss.

Just tried it. Looks great.

In fact, it can simulate the scenario better as compared to Chrome as the speed is shared by everything on the system and not just that Chrome tab.

Re: Ask HN: Why and how is Hacker News so fast?

#70

Earlier quoted context omitted.

Sorry for the offensive domain name (it's not mine), but this is relevant here: http://motherfuckingwebsite.com/

I prefer http://bettermotherfuckingwebsite.com/ which was my inspiration for my blog design http://benlowery.co.uk/ :)

As I said last time that link was posted:

> First thing I did, as I usually do with sites that have annoyingly small text width, was inspect element to increase contrast / width / remove the doublespacing. Then I read it. ...irony.

Post reply on HN