Live data from Hacker News

Web Performance Profiling: Google.com

requestmetrics.com

41–50 of 87 posts

Re: Web Performance Profiling: Google.com

#41

Am I the only person here who wasn’t thinking about the frontend, but rather all the things that need to happen in the backend to render the search results? To me it feels like an oversight when answering the question “how the hell is Google so fast?” and not digging into how Google is able to return the results to your actual search query in a matter of milliseconds. That, to me, is the real miracle.

It is an oversight, but equally for people like me it is helpful - I know how to optimise C++ (maybe not at google scale on my own!) but I've bullied compilers and measured pmc's, I haven't got a clue how to optimise frontends (beyond my usual solution of give up go and do something pleasurable)

Re: Web Performance Profiling: Google.com

#42
> How is Google so fast?

It is not. At least not in the way the article is talking about. So while yes, requests are fast, it doesn't really feel that way when I can't click anything for a good second after hitting search.

My browser takes roughly half a second crunching JavaScript, doing layout, and drawing the result page AFTER doing a whole boatload of HTTP requests. Annoyingly half that JavaScript runs AFTER the page is rendered (150ms-200ms of JS functions when I can already see results, why?), making the page appear to lag if you immediately try to click/tap something.

If they would serve the page as static html and css instead, load times could easily be below 50ms with another 20ms for my browser to present me with something that is interactive right away.

The impressive part is how fast they generate results.

Re: Web Performance Profiling: Google.com

#43
post #7

It feels fast because most other sites are insanely slow. Just build a normal HTML+CSS+JS site with serverside rendering, route the assets through a CDN and voila! your site will be just as "fast" as Google.

I think the point here is about how to make page faster about the same size.

Re: Web Performance Profiling: Google.com

#44

Earlier quoted context omitted.

Are you comparing search with a static page load ? Just compare the google page load if you want to compare with that ?

I'm just asking you to do the test, because it was forced on me for 6 months of my life :) Firstly, cr.yp.to is hosted on some really basic consumer grade hardware most likely and has to make an additional hop through Tonga of all places for DNS resolution. Of course, the page size of cr.yp.to is very small and does not involve any other communication with other servers to deliver a request. But Google has x million…

> But Google has x million machines

That's because google has that amount of traffic. I am sure a hn hug would take the cypto site down.

Re: Web Performance Profiling: Google.com

#45
post #23

One factor that is missing from this post is the processing time on the backend which is also insanely fast. This post only considers frond-end optimizations. On the author's benchmark, a roundtrip seems to take on average 30ms, and the time to first byte for the main content is around 140ms. Which means that in less than 110ms Google is able to parse the search query, and build the HTTP response. I'm sure they are h…

> for tail-end requests the result might not be as impressive

Yep, it is possible to craft search queries that take multiple seconds to process. Example [1]:

    the OR google OR a OR "supercalifragilisticexpialidocious" -the -google -a
[1] https://news.ycombinator.com/item?id=20605589

Re: Web Performance Profiling: Google.com

#46

Conversely, why is Windows search so miserably slow?

Google search can be fast because thousands of computers complete your request at once, whereas the index of junk on your Windows box only has the one little computer to serve it. Same reason why operations in Gmail are so much faster than a local client like macOS Mail: the instantaneous compute power brought to bear on your request while it is running is thousands of times larger than one computer.

Re: Web Performance Profiling: Google.com

#48
post #12

When I think of "fast", I always think of a time I was building a product that required subscribing to Twitter's API to receive updates from specific users. In my testing, I'd set a breakpoint on my server code to see when I'd get the "push" from Twitter's API and would use the Twitter App on my phone to create test tweets. Every single time, I'd create a tweet and my server breakpoint would be hit immediately. Not s…

What's really wild is that the architects who envision and oversee implementation of systems that make these things possible earn a tiny fraction of what executives make.

They make 5x+ the next highest IC, sure. But if they worked half as much and BS'ed 100x as much they'd make 500x.

Personally, that makes me wonder a lot more than a clever combination of memcache and map-reduce.

Re: Web Performance Profiling: Google.com

#49

Earlier quoted context omitted.

A cold cache google page load here pushes 725kb just to render a logo and search box. To avoid fingerprinting my cache is always cold. Google search is a huge dog

Considering the functionality, what would be your limit to keep google from being considered a "huge dog"?

Well compare it to:

https://lite.duckduckgo.com/lite

Re: Web Performance Profiling: Google.com

#50

Earlier quoted context omitted.

Considering the functionality, what would be your limit to keep google from being considered a "huge dog"?

Well compare it to: https://lite.duckduckgo.com/lite

That seems unfair, considering there is no lite google equivalent. The full duckduckgo site still comes in lighter (3/4 of the size), and includes a lot more media, so it's still better than Google.
Post reply on HN