Over-optimisation slows your site

Thank you! :D

I wish I could identify why my site has slowed since Cloudflare implementation. I added Redis cache and Cloudflare on the same day, so I might be misreading it.
 
Ok, so I am still struggling with Cloudflare. When I run pageinsights, my speed scores seem to be varying quite a bit, which didn't happen when I was using BunnyCDN. e.g. one minute they are 96, then down to 90. I even got a 70! With BunnyCDN I was consistently getting like 98.

To setup BunnyCDN, I used this for advice: https://www.keycdn.com/support/xenforo-cdn-integration

Code:
$config['externalDataUrl'] = 'https://examplepull-1a2b.kxcdn.com/data';
$config['javaScriptUrl'] = 'https://examplepull-1a2b.kxcdn.com/js';

This suggests to me that BunnyCDN was caching everything in the data and js folder. Is that correct?

My page rules in Cloudflare are:

1582722715185.png

Does this mean that the data and js folders are not getting cached?

I get a little confused with how Cloudflare works. It seems automated while BunnyCDN requires you to specify what you want cached.

At this rate, I will be cancelling my $20pm subs to Cloudflare and going back to BunnyCDN, and then get DNSMadeEasy just for the fast DNS. Logically, with the extra POPs, Cloudflare should be faster, so I must be doing something wrong.

Edit: Also, just had a thought. Can you view the page source to see what is being cached? When using BunnyCDN, I could see the different urls for the images, for example.
 
Last edited:
Ok, so I am still struggling with Cloudflare. When I run pageinsights, my speed scores seem to be varying quite a bit, which didn't happen when I was using BunnyCDN. e.g. one minute they are 96, then down to 90. I even got a 70! With BunnyCDN I was consistently getting like 98.
Do you have example links for these tests? It's hard to debug without data.

This suggests to me that BunnyCDN was caching everything in the data and js folder. Is that correct?
Yes.

My page rules in Cloudflare are:

View attachment 219279

Does this mean that the data and js folders are not getting cached?
No, data and js are being cached as well. You shouldn't need the /forums/styles/ pagerule, as you only have fonts under that directory that are automatically cached by Cloudflare. You only need the proxy.php pagerule if you're using the Xenforo's HTTPS image proxy.

I get a little confused with how Cloudflare works. It seems automated while BunnyCDN requires you to specify what you want cached.
Cloudflare transparently caches all static content on your site (based on file extension), as long as the orange cloud is activated and you haven't disabled caching via the caching tab or page rules. The page rules you're using force content that doesn't match static file extensions to be cached (eg css.php is a PHP file so not normally cached by Cloudflare).

At this rate, I will be cancelling my $20pm subs to Cloudflare and going back to BunnyCDN, and then get DNSMadeEasy just for the fast DNS. Logically, with the extra POPs, Cloudflare should be faster, so I must be doing something wrong.
As I've said, you really don't need the $20 Cloudflare plan. Downgrading to the free plan will give you identical performance.

Edit: Also, just had a thought. Can you view the page source to see what is being cached? When using BunnyCDN, I could see the different urls for the images, for example.
Just the "cf-cache-status: HIT" header, from looking briefly at your site, Cloudflare is working and caching the static content.
 
Yes, I look at both. The performance was better before I went to cloudflare. The ads were there before too, so I don't believe it is those that are making it slower than before.
 
Yes, I look at both. The performance was better before I went to cloudflare. The ads were there before too, so I don't believe it is those that are making it slower than before.
It might not be the reason that it's slower, but it looks to be the cause of the inconsistent results.

Your TTFB is slower with Cloudflare for non cached content, as using Cloudflare adds another layer to requests, as everything goes via Cloudfare's network. However, cached static content should be faster. This is probably what you're seeing when you notice a slight drop in pagespeed score.
 
Here is a link: https://developers.google.com/speed/pagespeed/insights/?url=https://www.access-programmers.co.uk/forums/threads/import-excel-data-to-access.309216/&tab=desktop

I was getting like 98 before and the scores were more consistent.


The performance is worse than before, so no point going with the free plan if I cannot solve why Cloudflare is slower than BunnyCDN.
focus on the individual metric values and ignore the grading score that doesn't tell you enough about where you're not optimal
 
@eva2000 One thing I have noticed is your scientific rigour. Do you track these variables on a spreadsheet when testing Control vs Experiment A? Do you test over several days, or maybe just reruns of the test on the same day, to weed out the noise?
 
@eva2000 One thing I have noticed is your scientific rigour. Do you track these variables on a spreadsheet when testing Control vs Experiment A? Do you test over several days, or maybe just reruns of the test on the same day, to weed out the noise?
I wrote a script to query gtmetrix, webpagetest and pagespeed insights' respective APIs and then have cronjob scheduled to run tests and send results to my private slack channel https://github.com/centminmod/google-insights-api-tools

shell script for pagespeed insights api query/tests
Bash:
#!/bin/bash
cd /root/tools/google-insights-api-tools
./gitools_v5.sh mobile https://servermanager.guide/
./gitools_v5.sh desktop https://servermanager.guide/
sleep 5
./gitools_v5.sh mobile https://community.centminmod.com/
./gitools_v5.sh desktop https://community.centminmod.com/
example output from manual run
Bash:
./gitools_v5.sh mobile https://servermanager.guide/
Bash:
./gitools_v5.sh mobile https://servermanager.guide/
--------------------------------------------------------------------------------
curl -4s https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=https%3A%2F%2Fservermanager.guide/&strategy=mobile&key=YOUR_GOOGLE_API_KEY

PageSpeed Insights v5 Score (mobile): 100 (fast)
https://servermanager.guide/
Lighthouse Version: 5.6.0
Total-Page-Size: 69 KB
First-Contentful-Paint: 1190
First-Meaningful-Paint: 1219
Speed-Index: 1266
First-CPU-Idle: 1779
Time-to-Interactive: 1824
Estimated-Input-Latency: 13
Time-To-First-Byte: 150 ms

JavaScript-execution-time: 0.3 s
URL  Total  Script-Evaluation  Script-Parse
Other                                                                                                             1167.77  91.84   4.72
https://servermanager.guide/wp-content/uploads/wga-cache/local-ga.js                                              136.12   122.86  5.90
https://servermanager.guide/wp-content/plugins/autoptimize/classes/external/js/lazysizes.min.js?ao_version=2.6.2  99.78    60.20   4.48

Eliminate Render Blocking Resource Potential Savings: null
URL  Size   Potential-Savings
and results are sent to my Slack channel which I can use slack search to query specific dates/times for results :)

1582822983062.png

I also run hourly webpagetest results which are charted and graphed so I can see my sites overall page speed profile at any point in time :)

example charts

1582823517249.png

1582823566626.png

1582823622653.webp

example command usage

Bash:
./gitools_v5.sh

Usage:

Google PageSpeed Insights v5
./gitools_v5.sh desktop https://domain.com
./gitools_v5.sh mobile https://domain.com
./gitools_v5.sh all https://domain.com

GTMetrix
./gitools_v5.sh gtmetrix https://domain.com

WebpageTest

supported region(s)
dulles, california, frankfurt, singapore, sydney
dallas, london, tokyo, hongkong, mumbia, brazil

./gitools_v5.sh wpt https://domain.com {region} cable
./gitools_v5.sh wpt https://domain.com {region} 3g
./gitools_v5.sh wpt https://domain.com {region} 3gfast
./gitools_v5.sh wpt https://domain.com {region} 4g
./gitools_v5.sh wpt https://domain.com {region} lte
./gitools_v5.sh wpt https://domain.com {region} fios
 
Last edited:
Top Bottom