Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2013-12-25 19:08:39

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

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

gaekwad wrote #277546:

I use cdnjs for my scripts

I personally randomly get error and slow responses from cdnjs. Way back I used to use them for side projects, but the stability became an issue.

I doesn’t mean CloudFlare is bad, not at all, at most just that they might not be throwing enough money to cdnjs to be able to withstand the traffic.

I’m a big fan of APC

You will get even better results with the new Zend OPcache, or for non-Textpattern projects you can also use HHVM. Zend OPcache ships with PHP 5.5.

APC on the other hasn’t been touched since 2011. APC and OPcache are very different; APC can be used as key value storage, while Zend OPcache is very performant drop in OPcache; just activate it and it does its thing. Only thing you might have to do is to invalidate the cache when you update files.

I do gzipping at the httpd level rather than via plugin.

Keep in mind that mod_deflate, the module you are likely using, is very-very simple and doesn’t do caching. It buffers and compresses each request on the fly, causing some CPU, memory and I/O hits.

Offline

#26 2013-12-25 20:38:56

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

Jukka, whenever I read your replies to my post, you invariably make me question things I do and asks whether I’m doing it the best way.

This is very good for me, so thank you. I might not immediately understand everything you refer to, but know that I am very grateful for your time and input.

Offline

#27 2014-02-10 11:06:16

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 619
Website

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

Hi! :)
Just started using Google PageSpeed and wonder if any of you guys know how automatically losslessly compressing all jpeg files in the ‘/images’ folder please?

I can’t really ask my clients to do it using a desktop program before they upload to TXP,
so it’s needs to be done on the server side somehow please.
Maybe…only for thumbnails?

Some info can be found in these links:
http://stackoverflow.com/a/13717441/962643
https://code.google.com/p/page-speed/source/browse/lib/trunk/src/pagespeed/image_compression/jpeg_optimizer.cc
https://developers.google.com/speed/docs/insights/OptimizeImages

Offline

#28 2014-02-10 11:21:03

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

If you use Google’s mod_pagespeed Apache module, I think it can be done per directory. More info here.

I use that module myself on my web server, but not for image optimisation tasks.

Offline

#29 2014-02-10 13:25:33

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 619
Website

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

Unfortunately the mod_pagespeed module is not available on Hostgator shared accounts :/
Any other ways to make this compressing magic thing?

Offline

#30 2014-02-10 15:54:58

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

You might be restricted by shared hosting. I know Hostgator do gzip compression on their VPS servers, but not on shared (or at least they didn’t last time I checked). I doubt you’ll be able to run zopfli on your shared server, but you might want to investigate another way of using it. Note: I haven’t use zopfli on jpg images, so your mileage may vary.

Offline

#31 2014-02-10 16:02:04

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

zopfli isn’t an image optimiser exactly. I think The Blue Dragon was referring to these kinds of image optimisation tools.

Offline

#32 2014-02-10 16:03:36

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

Mea culpa, I was confusing it with zopflipng – which is png and not jpg. Thanks for the clarification, Phil.

Last edited by gaekwad (2014-02-10 16:03:46)

Offline

#33 2014-02-10 19:41:52

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 619
Website

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

I am able to use mod_deflate, and currently using it for Javascript files, does it also good for images?

Offline

#34 2014-02-10 21:26:42

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 doubt gzip (deflate) will make much difference to JPEG or PNG files since they are already compressed file formats. It might chew up some more server resources trying to as well.

Things like ImageOptim reduce image files by stripping out redundant code (metadata, unused colour depth, etc).

Offline

#35 2014-02-10 23:29:29

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’ve been thinking about this thread tonight – if the images are large and not web-optimised, would some server-side processing with ImageMagick or gd work?

The Blue Dragon: can you point us to a site?

Offline

#36 2014-02-11 08:32:18

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 619
Website

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

philwareham wrote #278785:

Things like ImageOptim reduce image files by stripping out redundant code (metadata, unused colour depth, etc).

yep that’s what I’m looking for, just to remove all the info and stuff, to get a higher score lol.

gaekwad wrote #278795:

The Blue Dragon: can you point us to a site?

Hi Pete, my name is Gil :)
and speak don’t I side server lol
I have no idea, for the site graphics I use tinypng.org , but for user content images I got nothing so far, and that’s why I came to ask you guys.
All I got are the three links for some info that I shared in my first post here in the previous page.
I wish I could use the pagespeed module as it is the best of course converting your images into WebP and all that stuff.
But even a simple module that will remove all the unnecessary info and stuff will do the job.

Offline

Board footer

Powered by FluxBB