Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2013-02-12 15:00:56

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: PageSpeed, caching, Cloudflare and other site speedup methods

I’ve just set one of my Textpattern sites to use Cloudflare, I’ll report back on how it went when the nameservers are moved across.

Offline

#14 2013-02-12 16:01:27

towndock
Member
From: Oriental, NC USA
Registered: 2007-04-06
Posts: 329
Website

Re: PageSpeed, caching, Cloudflare and other site speedup methods

I look forward to the results (and if there are any apparent negatives). Our key site can have traffic spikes that strains a dedicated server. If Cloudflare can make a significant difference on site speed and server load, I’m interested.

Offline

#15 2013-02-12 16:10:21

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: PageSpeed, caching, Cloudflare and other site speedup methods

Well that was painless, all done now. Set up the *domain.com/textpattern* rule too and that seems to work (disallowed the Cloudflare apps from being active when in the Textpattern admin side).

As for performance, well the extra level of cacheing and CDN will certainly help I think. It’s a pretty low traffic, low complexity site anyway that I’ve tested this on so it’ll be difficult to measure the benefits too significantly.

Offline

#16 2013-02-13 01:05:09

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: PageSpeed, caching, Cloudflare and other site speedup methods

Phil, I still have domain.com/textpattern/* and that also seems to work, no loading of Cloudflare from within TXP admin. Not sure if I need to change to *domain.com/textpattern/* or not.

Some performance reports – on one site Page Speed Insights went from a score of 51 to 98 after turning on Cloudflare. Settings are aggressive (CDN + Full Optimisations). The only thing Page Speed suggests is a longer browser caching setting – currently it is 5 days and it suggests 7. Changing the setting to 8 days does not make any difference in this case as Page Speed then brings up something about TypeKit – in fact the report seems to bring something new up on each refresh, so its probably better to wait for some time before re-running the report.

I also placed TXP Tips behind Cloudflare and this was a little embarrassing – the fonts changed this morning and it seems I never paid attention to this at all (that’s what you get for putting up a site over a weekend and not performing checks or updates) because suddenly the fonts I’d chosen on TypeKit were not being applied – until today! So what the font! Should give me the kick I need to update the site and do a better job this time.

Last edited by jstubbs (2013-02-13 01:05:27)

Offline

#17 2013-02-13 08:23:46

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: PageSpeed, caching, Cloudflare and other site speedup methods

Nice. FWIW I’ve never managed to get Google Page Speed to go higher than 98 on any of my sites, I think it’s impossible to get a 100 score – but I’d like to be proven wrong.

The one I put on Cloudflare yesterday is giving me a 97, but I think it was that score before. I’d already minified HTML, js and CSS and was loading images from subdomains etc. next time I’ll try it on a less optimised site.

Offline

#18 2013-02-13 14:14:17

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,079
Website

Re: PageSpeed, caching, Cloudflare and other site speedup methods

Please take Google Page Speed with the proverbial grain (ok, a few…) of sand. It always finds something. I have one section of a site reaching a score of 99 (without Cloudflare)1, but another section goes down to ~75. The difference? Images. The latter section has content images that a larger than their containers. Those images are state-of-the-art-optimised to display well on both lowDpi and hiDPI screens but Google Page Speed doesn’t want to know about that.

On a related note, does Cloudflare still do a lousy job at re-compressing images? A couple of months ago when I tested them, the result was not exactly pretty, especially on hiDPI screens (I checked both iPhone 4s and rMBP, both tested over Wifi to make sure that the mobile provider didn’t add more compressing, something SoftBank does).

1 complaining something about Jquery on the Jquery CDN.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#19 2013-02-13 16:20:59

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: PageSpeed, caching, Cloudflare and other site speedup methods

I’ve gotten a site to get a 94 on Google Page Speed with just some .htaccess caching settings.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#20 2013-02-14 14:47:33

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 305
Website GitHub Twitter

Re: PageSpeed, caching, Cloudflare and other site speedup methods

@jstubbs

I use XCache 1.3.2 on lighttpd together with aks_header and aks_cache.
<txp:aks_header strip="1" />
CSS-Sprites brought me up to 95 points in Google Pagespeed, but I have to many javascripts.

Also I have moved textpattern completely in memory /dev/shm (don’t forget to regularly backup to disk) …

Last edited by whocarez (2013-02-14 16:40:22)

Offline

#21 2013-02-14 15:48:34

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: PageSpeed, caching, Cloudflare and other site speedup methods

MattD wrote:

I’ve gotten a site to get a 94 on Google Page Speed with just some .htaccess caching settings.

Well, the test bases its results on HTTP header inspection, response times and checks content from some bytes (or pattern of bytes). Everyone will usually get relatively high values from the test as long as you don’t build bad websites.

It will give you pointers, but it will not take into account site’s code quality or how much server resources or bandwidth the site could be wasting. Or if the optimization are even remotely close to correct for the content the site is serving. I.e. news sites that pages are cached for a week at time. Um, right. It doesn’t know your rights from wrongs, it knows practices, downfalls, accepted solutions and can inspect.

For instance, on-the-fly minification and compression could be wasting tons of your server resources, but as long as the test gets its requests responded in timely fashion, the test will contribute that as a good thing, giving you higher score. While in reality every request is consuming close to 10x times the memory it would be without those scripts.

Offline

#22 2013-02-14 16:12:40

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: PageSpeed, caching, Cloudflare and other site speedup methods

@gocom Very true. On-the-fly minification for CSS and JavaScript is a total waste of server resources – just minify the files before you upload them. HTML minification probably would have to be done on-the-fly though unless you are coding a static flat site, but then hopefully cached for whatever time is right for your site.

Following on from some of your previous comments I’m also careful to avoid unnecessary calls to the database, e.g. on a site that is only ever going to be en-gb there is no point in using…

<html lang="<txp:lang />">

When this will save a query…

<html lang="en-gb">

I guess each of those saves a tiny bit of time and resources?

And it’s obviously far easier to get a high Google Page Speed score on a simple text page than on a page with loads of complex stuff going on (such as third-party js libraries from a CDN, responsive images, HiDPI images etc).

Offline

#23 2013-12-25 00:51:58

Maurice
Member
From: Auckland, New Zealand.
Registered: 2010-12-02
Posts: 25
Website

Re: PageSpeed, caching, Cloudflare and other site speedup methods

Regarding speed, I just installed asy_jpcache plugin, noticed it was taking longer to load when testing on Pingdom but faster on Gtmetrix. Does rah_cache plugin offer better performance?


<txp:carver category="stone" type="hard"> These bits are harder than Basalt </txp:carver>

Offline

#24 2013-12-25 16:26:27

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: PageSpeed, caching, Cloudflare and other site speedup methods

I use cdnjs for my scripts, frameworks and some other things. What I like about cdnjs is the flexible nature of their content; it’s a peer-reviewed CDN that CloudFlare ultimately host. I was trying to find a CDN that housed Flowplayer, jPlayer and some other things that could be considered niche. I couldn’t find one, but 1 Github fork and a pull request or two later I’d added Flowplayer in, and it’s now running on one of my sites from cdnjs.

Also, I’m a big fan of APC, which I run on Apache httpd. I’m not yet smart enough to get nginx or lighttpd running in place of Apache httpd, nor do I need it, but I’m curious how that might impact things. I do gzipping at the httpd level rather than via plugin.

FWIW, I’ve eked out an 89 from Google Page Speed, and I dip in and out of YSlow now and again. I consider a 90+ to be me levelling up in life. One day.

Offline

Board footer

Powered by FluxBB