I have been using Cloudflare for a while, however I am having an issue where I am getting significantly increased page loading times measured both on Google PageSpeed Insights and on Google Chrome.
Without it being Proxied:
Uploading: Screen Shot 2022-05-01 at 10.23.07 PM.png…
With it being Proxied by Cloudflare:
![Screen Shot 2022-05-01 at 10.08.45 PM|459x500](upload://65
As you can see, there’s a 45% decrease in Google PageSpeed Insights score, but in addition the Google Chrome loading times are over twice as long!
This is a drastic performance hit. I really like using Cloudflare but I can’t afford to take such a drastic performance hit. I even went as far as setting up a staging subdomain on the same server with the same content, but opted to not have that proxied. The results consistently replicable.
Do I have something misconfigured?
Lots of Cloudflare’s benefits come from the caching & speed optimizations that are available to you (albeit some have plan requirements.)
As an example,
.html isn’t cached by default so that’s fetched from your origin. If your site is fully static, create a
Cache Everything rule so that your site is being served fully on Cloudflare’s edge rather than having to hit your origin. https://support.cloudflare.com/hc/en-us/articles/360021023712-Best-Practices-Speed-up-your-Site-with-Custom-Caching-via-Cloudflare-Page-Rules#h_7JfAZiS5qMLcTkUpKvebHJ
Your site has lots of large images which will be a big hit for Lighthouse which usually runs on mobile devices/throttled connections, so you’d want to look into something like Image Resizing which allows you to do lossy/lossless compression with next-gen formats such as WebP/AVIF - which will massively reduce the file sizes. https://developers.cloudflare.com/images/
The aforementioned images are also the biggest killer for your Lighthouse scores.
In general, I’d have a look through the following tabs in your zone on the dashboard (https://dash.cloudflare.com/?to=/:account/:zone) and see what’s available to your plan and what you could enable, such as:
- Speed → Optimization
- Caching → Configuration / Tiered Cache
There’s lots of options in there for you to get better compression, cache hit ratios, lower file sizes and a host of other things. I’d recommend something like https://webpagetest.org as opposed to Lighthouse whilst you’re still squeezing performance out of your website since it gives a lot more ‘here’s how you could get better’ rather than ‘here’s what you’re doing wrong’ - I’ve ran a test on your site at ts.marketing : Chro...irginia USA - EC2 - WebPageTest Optimization Check Results
Hi, thank you for your post. I have fixed the caching issue but the still doesn’t explain why Cloudflare proxy is Significantly slower than not proxied. What gives?
Here is a test from https://pagespeed.compare - look how much worse the performance is of CDN over the non-proxied staging:
My test shows it as the same, if not better. Do you have a link to a specific https://webpagetest.org run?
That’s so odd, I am getting the complete opposite results on every testing platform (Google PageSpeed Index, WebPageTest, Chrome) I use…
Here’s staging (not proxied): staging.ts.marketing...rginia USA - EC2 - WebPageTest Result
Here’s live (proxied): ts.marketing : Chro...irginia USA - EC2 - WebPageTest Result
Here was the Google Page Speed Index score for staged (not proxied):
Here was the Google Page Speed Index score for live (proxied):
I am seeing these poor results consistently. I just realized in my first post all the images didn’t upload hence the confusion in my question…
Looking at the two waterfall charts, it seems like you’re loading way more stuff via Google Tag Manager in the production vs the staging site.
You could also try disabling “rocket loader” in the Cloudflare dashboard, since that’s another variable here.
I disabled Rocketloader and that did seem to help, slightly. But Cloudflare is still slower, just not as significantly.
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.