3 ms·
(Edit: another thought, maybe your curl testing took longer with all the extra CSS in the download and writing to disk if that's what you did - an AMP requireme
by whalabi 8y ago
(Edit: another thought, maybe your curl testing took longer with all the extra CSS in the download and writing to disk if that's what you did - an AMP requirement. But did your curling pull down the external CSS/JS for non-AMP?)
According to the webpagetest.org results you linked, which ran the test 9 times on each page, the mean time to first byte for the AMP page is 1005, and for non-AMP it's 989.
Which is just 16 ms.
But the time to visually complete for example on non-AMP is 1955, and on AMP it's 2166.
Which is a difference of 211 ms (which percentage wise is almost 10x bigger (I think, I'm not super mathy)
This implies to me that the problem is AMP not the server.
But if your data is correct then perhaps something is up.
The thing is, I know how the site is coded. The AMP version just excludes things almost exclusively. Although it does have to render the CSS in place (the fragment is cached) rather than just link to a stylesheet.
But here's the thing, even if that is the problem, the only reason it's like that is because that's what AMP requires.
Maybe there's changes we could make on the server, but according to this webpagetest site, the problem doesn't appear to be the server nearly as much as the rest of the render process.
- jefftk 8y agoFor the curl testing I did: for prefix in article amp/article; do echo $(for i in {1..9} ; do (time curl -sS https://unlikekinds.com/$prefix/google-amp-page-speed > \ /dev/null) 2>&1 | grep real | awk '{print $2}' done) done Do you see the same results? I shouldn't have focused so much on the difference between the AMP and non-AMP times, though. The main thing I wanted to point out is that if your server is taking almost a second to return html there's a lot you could do to improve pageloads right there.
- whalabi 8y agoI hear ya. It's rails running (with its database) on a single small VPS, so I'm pretty pleased with how it's running, particularly given the load yesterday. And thanks for sort of fact checking, for a second I thought whoa, that could be it, all on the server side. Don't think it is though. I might set up some performance testing on a local copy to check the difference between the two just to be sure (especially because the article ended up getting a lot of attention.) That's some pretty badass shell scripting, I'll give it a try in a bit.
- jefftk 8y agoIf you put varnish or something in front of rails to cache your responses you could probably cut 400-600ms off your loading time.