Live data from Hacker News

I am a fast webpage

varvy.com

41–50 of 292 posts

Re: I am a fast webpage

#42
post #13

How much does HTTP/2 mitigate the need for such techniques, if at all?

HTTP/2 with server push will eliminate the inlining hacks, and automatically compress content.

But the other points remain: No Javascript is still the fastest Javascript framework, and while you can do lots of crazy hacks with CSS, maybe you shouldn't.

Re: I am a fast webpage

#43
The best "Shift+Reload" refresh I've managed to get out of this page from where I'm sitting, in Firefox 48.0.x, according to its Network Console, is around 360 ms. It doesn't beat this HN discussion page by a whole lot, and this has actual content, which is dynamic.

Re: I am a fast webpage

#44
post #33

Is this image inlining thing something new? Am I reading it correctly that the images are encoded in base64 and delivered as html? Surely this is a bad idea... no?

> Is this image inlining thing something new? No, it's been around since forever. Just not used terribly often. > Am I reading it correctly that the images are encoded in base64 and delivered as html? Surely this is a bad idea... no? It depends. Making a new request to fetch the image always has overhead. Whether that overhead is bigger or smaller than the overhead of base64-encoding the image depends on: • file size…

Completely offtopic, but how do you type •? I like it.

Re: I am a fast webpage

#45

Pretty good at 97/100 on Google's PageSpeed Insights - https://developers.google.com/speed/pagespeed/insights/?url=...

Don't really think PageSpeed score really accurately reflects page loading speed (maybe initial page loading speed). It seems to not really care about lazy loaded resources as one of my JS heavy webapps I made (around 200KB) actually scores higher than this one https://developers.google.com/speed/pagespeed/insights/?url=.... Funnily enough the screenshot on the test only shows the loading spinner.

Re: I am a fast webpage

#46
post #33

Is this image inlining thing something new? Am I reading it correctly that the images are encoded in base64 and delivered as html? Surely this is a bad idea... no?

> Is this image inlining thing something new? No, it's been around since forever. Just not used terribly often. > Am I reading it correctly that the images are encoded in base64 and delivered as html? Surely this is a bad idea... no? It depends. Making a new request to fetch the image always has overhead. Whether that overhead is bigger or smaller than the overhead of base64-encoding the image depends on: • file size…

You forgot the most important factor: Whether you're reusing that image on a different page. Embedding images in the HTML is basically saving an HTTP request at the expense of not being able to cache the image separately from the HTML.

Re: I am a fast webpage

#47
post #40

Earlier quoted context omitted.

> You could just throw it on S3. Even better, you could put it behind a CDN like Cloudfront and the total cost would be a dollar or two a month, not $25+ and it would be significantly faster. I apologize for quibbling (really, I do! but I'm an infrastructure guy! This is my bag!). Yes, host it on S3, but ALWAYS put a CDN in front of S3 with long cache times (even just Cloudfront works). S3 can sporadically take hundr…

How long S3 takes to fulfil a request does not affect bandwidth. I personally went the other way. I still use CloudFront as a CDN but made it cache items for short periods of time. Invalidation was too much of a hassle, and it took too long. Admittedly, I should use hashes or something of the sort to keep my items versioned, but laziness always gets in the way.

> How long S3 takes to fulfil a request does not affect bandwidth.

Correct. Did I insinuate that? I apologize if I did. They are two distinct issues, both of which a CDN prevents.

1. S3 outbound bandwidth is expensive. Use it only as an object store of last resort. Your CDN bandwidth is orders of magnitude cheaper (don't believe me, go compare the pricing).

2. S3 response times can vary wildly at times. Use a CDN to avoid this.

And of course feel free to use a cache key instead of invalidating via an API if ~15 minutes it too long to wait for fresh content to appear at edges.

PS Don't apologize for laziness. When directed appropriately, its a most productive force.

Re: I am a fast webpage

#48
post #6

Not that wickedly fast unless you're really near Dallas where the server is: https://performance.sucuri.net/domain/varvy.com Hosting on a single VPS is never gonna be very fast globally no matter what you pay your hosting. In fact our free plan on netlify would make this a whole lot faster...

It's still pretty fast all over the world, because that total time is all you need. For most sites, that three seconds is just the start, ensued by several more seconds of downloading CSS, JavaScript, images, analytics, widgets, and whatnot.

Re: I am a fast webpage

#49

Is this image inlining thing something new? Am I reading it correctly that the images are encoded in base64 and delivered as html? Surely this is a bad idea... no?

I think it depends on how much of an image we're talking about.

If it's small, the overhead from base64'ing it (if the page is gzipped) is lower than the overhead of opening a new HTTP connection just to retrieve that one image.

Re: I am a fast webpage

#50
post #6

Not that wickedly fast unless you're really near Dallas where the server is: https://performance.sucuri.net/domain/varvy.com Hosting on a single VPS is never gonna be very fast globally no matter what you pay your hosting. In fact our free plan on netlify would make this a whole lot faster...

Off topic, but is that service showing crazy slow numbers for "USA, Atlanta" for anyone else?
Post reply on HN