-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up homepage load #25
Comments
Do you know how much of this is because the latest news post is a competition summary? |
Hey, A better thing to consider is what speed is actually required! Rather than just state "this is too slow", how about defining what is an acceptable load time (e.g. Which features of the site must be functional by a specific time), then implementing a test setup to ensure that this is actually met. This would be a far more productive activity. On 11 September 2016 21:11:53 BST, PeterJCLaw [email protected] wrote:
|
Some of this is certainly due to the currently news story being the competition summary, though that is something which is going to be the case for ~4 months of the year, and those are the months of the year where new people are most able to actually join SR, so it's a fair comparison to be made. I suspect that while we'll have more traffic during the other portions of the year, that traffic will be from people who already have an interest in us anyway. From memory, the single biggest portion of the homepage is the top banner image, though the new fonts which are loaded aren't small either. In terms of what "fast enough" means, I'm not sure. This is definitely something which falls into the "a fuller investigation is warranted" that I mentioned originally. It's worth noting however that while I've used a mobile connection to benchmark against, I started looking at this because of a combination of:
We should also compare the number of visitors we get on mobiles vs desktop before a decision is made about what "fast enough" means. |
Ok, so we're now several months later. I feel that sufficient time has now passed over which we should have the data on the number of users on the site. I've not looked at that myself, but it should be available in piwik. For a starting point comparison I've run webpagetest against the old and new homepages using the default settings. The results are both remarkable and exactly what my gut reported in the first place:
It should not take 5s for a website's home page to load! 2s is hardly anything to be proud of either, but was a world better. Here's a list of relatively quick wins:
In the longer term we really should be serving using HTTP/2 rather than HTTP/1.1. This is entirely doable now that we're serving plain files through nginx. Obviously the main advantage of HTTP/2 is really the server-push it enables and further work is needed to get to that, but even without that there should be some improvements just from using the more condensed protocol. |
I've just done some very crude testing of the quick wins I created PRs for. Together they improve the (local) first-load time from ~1.30s to ~0.96s; with a hot cache it goes from ~0.95s to ~0.55s. If we see even remotely proportionally similar gains on the live site, this is already looking like a significant improvement. |
Cheers for doing all this Peter, I merged your stuff and deployed it, the results are here: |
Just spotted that we use a different image on the other pages (i.e: not the homepage), so we should apply the same trick CSS logo shrinking trick there. It also occurred to me that we could use |
Interesting, the speedups seem to be roughly in line with what my local benchmarks suggested (by proportion), though they aren't all coming in ways I'd expected them to. |
I've updated the description to include a TODO list. I suggest we work through that list and then close this ticket; further issues can be raised separately. |
Latest report: https://www.webpagetest.org/result/170209_GE_1VB9/ Interestingly it seems that the load times fluctuate more by report run than they do as a result of our changes. |
Report on 3G based in London: https://www.webpagetest.org/result/181215_57_812c687ef1dcbae60291f02b2827a0e3/ |
Update: since the move to Mythic Beasts we are indeed now serving with HTTP/2 |
At the moment the homepage takes around 17-20s (DOMConetentLoaded in 2-3s) to fully load over a simulated (using Chrome's dev tools) "Good 3G" connection (without caching). This compares fairly badly to the previous site's 2-3s (DOMConetentLoaded in < 1s).
I think there are a number of causes to this, though a fuller investigation is warranted:
Keep-Alive
the HTTP connection, which we used to (I'm not sure how this relates to HTTP/2, which we should also look at using)TODO:
The text was updated successfully, but these errors were encountered: