Incredibly slow site when not cached


#1

OK, so, when the site is cached, it loads at around 3 secs (which I still think is slow, before using cloudflare I had this down to 2)

But when I purge the cache the load time is ridiculous. First byte is at 7sec, total load 11 secs. Its a 1mg website!

The un-cached version is the version of the site new visitors will see, and if its taking 11 secs to load, they are not going to stick around. Why is this so high? anything I can do to reduce it? I even have ARGO enabled.

site is : https://www.logoglo.com/

Thanks.


High TTFB time
#2

Argo requires some level of traffic to determine better routes, at the moment there isn’t a lot of traffic Globally so Argo is going to have limited ability to calculate better routes. If you look at the Analytics you’ll see where the majority of traffic is currently coming from and the % improvement seen where smart routing is in use.

https://www.webpagetest.org/result/180516_NB_9256c3bf06e2676b40d682ca90b8f662/
https://www.webpagetest.org/result/180516_K7_3287baac89f8e44755985f708e99cda2/

TTFB appears to vary widely depending on the location of the test.

Is this shared hosting?


#3

More “1st time visit” test results:


#4

It is shared I believe, godaddy. At the min, 1st time visit loads are through the roof, what is causing this?


#5

Have you tried bypassing Cloudflare (pause mode) to see what your first
time load performance is without Cloudflare’s involvement?


#6

Shared hosting is rarely performant.


#7

Instead of using things like Rocket Loader, try to optimise your site!

You use way too many fonts! Why do you use both Roboto and Open Sans? That means there are 8 woff2 files! Use only 1 font! (You maybe just need 3 woff2 files, 300,400,700)
Do you use a caching plugin? Get one with a page cache function (W3TC).

There are also some problems… the recaptcha__en.js loaded 4 times!!!

There are 13 .js files, they can be combined and minifyed.
There are 5 css files, they also can be combined and minifyed.

You have to do it manually!

Google Servers are slower than Cloudflare! Host everything locally on your server, then Cloudflare can cache them!

And the most important: Your cache control header is: max-age=0
Now with that how you want proper caching?


#8

Hi, trust me, I obsess over load times, and have spent weeks optimizing it. I use wp-rocket, and cloudlfare to minify everything, scripts that dont minifiy are off site, and are usually googles own.

Thanks for your answer…

I only use open sans, roboto must be used by a plugin.

Recaptcha, I know! its frustrating, but I have tried many form plugins, and this seamed to be the fasted, all of them loaded that script multiple times. I search the internet and it seams a pretty common problem.

Any ideas of how to host all the scripts locally?

That max-age? how would I change this?

Thanks.


#9

The further optimization takes time and need some experience and it’s an experimental project.

To host scripts locally simply download them and copy the files to your server.
Then dig into your files/plugins, search for the instance/instances where the plugin calls the script and change the file path to the path of your own hosted file.

Manually combining js files and minifying them is better than using cloudflare or wp-rocket’s minify option. The problem is that it’s not easy because you have to do it slowly and you need to test your site if everything is working as it should.

For fonts, check out this:
https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,700,700italic,400

Download the woff2 files you need and copy them to your server. Then in your CSS you can point to these woff2 files. Search in Google for “host fonts locally”.

Read this for hosting fonts: https://css-tricks.com/snippets/css/using-font-face/

It’s not a good idea to mix fonts on your site. If a plugin uses roboto, then you can change this font to Open Sans in you plug-in. You need a little coding to do this.

I’m a fan of W3TC cache, so I don’t know WP-Rocket, but there should be an option for setting the browser cache, there you can set the cache header to: “Public, max-age=3600”

Or you can set it in your .htaccess file.


#10

Thanks for your advice, I will dig deeper and see what I can do.


#11

I have tweaked the hell out of my site, I have perfmatters, wp-rocket and cloudflare, yet that 1st byte is still way up there when not cached…question, when not caching, does my site use the origin server (godaddy) or cloudflare?

I disable and enable cloudflare to test, and there is no difference to the first byte, surely there should be as even without caching, files are served over cloudflares servers right? so if its not files, is it a slow origin server?


#12

If the page isn’t cached by Cloudflare, the data still has to come from your origin web server. There’s no improving TTFB in this situation. As I mentioned in your earlier thread, that’s why I cache the home page, but am careful about how I do it.

It’s like Visitor asking Cloudflare “Hey, can I get a Logoglo page?” Then Cloudflare has to grab it from your server, then give it to the visitor. Cloudflare is very fast, but it still has to wait for your server to render the page source. It’s effectively like having your visitor go straight to the origin…except for a tiny bit of additional overhead for Cloudflare to do its thing.

The good news is hopefully Cloudflare has enough of everything else cached to decrease the overall load time.


#13

Thanks, so it might be worthwhile switching to a faster host right?

With cloudflare caching its SUPER fast, couldnt be happier, its all about that 1st uncached visit, which are potential new customers having a bad load time.

Thanks for your help.


#14

Certainly, a better server setup will help. You’re facing a hunt for improvement in:

  • Server speed (more expensive hardware)
  • Network speed (host’s connection to the Internet)
  • Location (distance from visitors)

Since you’re using wp-rocket, you’ve eliminated a lot of processing overhead because the page source is pre-rendered and ready for delivery.

Shared servers aren’t very efficient. Since you’re into the nuts and bolts of your configuration, there are many good VPS/cloud hosts that offer plans for $5-$10/month. Three very popular US-based options are Digital Ocean, Linode, and Vultr. You’ll just need to learn how to set up a robust server. Digital Ocean has a tremendously helpful documentation library.

I’ve used ServerPilot.io to auto-configure a VPS that’s very robust. They have a free plan you can tweak to add SSL.


#15

Ya know…I don’t think it’s incredibly slow. I just ran a Pingdom test from Australia. On first run, the home page HTML loaded in less than a half-second:

The biggest slowdown I see is your server redirecting from logoglo.com to www.logoglo.com
If you have an available Page Rule, I would do this:
Match logoglo.com and URL redirect (301) to https://www.logoglo.com

This will redirect anybody who just types in logoglo.com go straight to the HTTPS and www all in one very fast redirect handled by Cloudflare.


#16

Gotchya, so the re-direct at server level can be removed?

Thanks!


#17

It’s typically better to do this with a pagerule rather than removing
it. Removing it can make caching worse as Cloudflare now needs to cache
http://logoglo.com and http://www.logoglo.com (and the https:// versions
of each) separately.


#18

Awesome, thanks, so what would the actual rule look like?


#19

Should look like this. Make sure it’s the First rule.


#20

Added, thanks, so is it normal for it to produce a 307?