Why are pages slow?
themvcblog.typepad.com
Why are pages slow?
1–10 of 13 posts
Re: Why are pages slow?
#2Re: Why are pages slow?
#3Re: Why are pages slow?
#4Re: Why are pages slow?
#5I'm interested to see what's said for "poor cache-ability". It's an area where the assumption of "more caching is better" can be wrong. I've seen real-world A/B test results that indicate client-side caching can often be slower than re-fetching a resource from the network. Typically, this is true for small resources being loaded from the disk cache (i.e. your home page on a new browser session). It's counter intuitiv…
Re: Why are pages slow?
#6I'm interested to see what's said for "poor cache-ability". It's an area where the assumption of "more caching is better" can be wrong. I've seen real-world A/B test results that indicate client-side caching can often be slower than re-fetching a resource from the network. Typically, this is true for small resources being loaded from the disk cache (i.e. your home page on a new browser session). It's counter intuitiv…
Until some guy from New Zealand that doesn't have an edge in his country comes along. Don't actually apply this optimisation just because it's faster for you. It's probably slower for a lot of the rest of the world.
The particular scenario where we saw network-loading of resources consistently being faster was on first load of a frequently viewed page. In this scenario we found that loading certain scripts and images from cache (which we inferred to be physical disk because it was 'home page' activity) was slower for a significant portion of the experiment group than loading from the network. In this context loading from 'network' meant either a hot HTTP request to a CDN or inlining small images and scripts directly in the HTML on every single request.
As I mention above, it's worth regularly re-evaluating assumptions. I'd bet that the big CDN players have a huge presence in New Zealand and Australia, given the latency, cost of ingress and density of the actual population centres.
Re: Why are pages slow?
#7I'm interested to see what's said for "poor cache-ability". It's an area where the assumption of "more caching is better" can be wrong. I've seen real-world A/B test results that indicate client-side caching can often be slower than re-fetching a resource from the network. Typically, this is true for small resources being loaded from the disk cache (i.e. your home page on a new browser session). It's counter intuitiv…
Re: Why are pages slow?
#8I'm interested to see what's said for "poor cache-ability". It's an area where the assumption of "more caching is better" can be wrong. I've seen real-world A/B test results that indicate client-side caching can often be slower than re-fetching a resource from the network. Typically, this is true for small resources being loaded from the disk cache (i.e. your home page on a new browser session). It's counter intuitiv…
Re: Why are pages slow?
#9On a serious note: I think Opera Dragonfly is also a great tool for this providing even more information.
Re: Why are pages slow?
#10The solution has been to serve static HTML, i.e. the index page of the single page app part, with a one hour cache expiration and links to other static resources (JavaScript, CSS, images etc.) decorated with their E-Tag and loaded from a CDN. For non static pages the set up is the same, but the caching time is lower. The static resources have far off (one year or so) expiration headers so are cached permanently.
By using a CDN for all your assets you can reduce a 200ms roundtrip to 8ms for all users worldwide, bringing the page loading time to way below 200ms with an empty cache and well below 100ms with a primed cache since you still need to do an XHR to check the login status.
Small time saving tip: if you go with CloudFront, go all out and use all edge locations - it's cheap. I tried using Europe only at first only to eventually find out that I was still being given an edge location in the US despite being in Finland.