Optimizing Joomla page speed load

Discussion regarding Joomla! 3.x Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
User avatar
changlee
Joomla! Explorer
Joomla! Explorer
Posts: 470
Joined: Tue Nov 20, 2007 11:05 am
Location: Greece
Contact:

Optimizing Joomla page speed load

Post by changlee » Wed Jun 17, 2015 4:23 pm

Hello Joomlers,
I have spend months and monhts trying to optimize my Joomla pages. I chose JCH with Joomla default cache plugin (including browser cache), Conservative Cache and gZip.

But that caused a lot of CPU load. Finaly, a Linux man advised me NOT to use gZip and other plugins but only Joomla default Cache.

So I am now using ONLY the default Joomla Conservative cache plugin with the System Page Cache. Also I have inserted few lines of code in .htaccess in order to gZip the pages with the server CPU, not from PHP.

And it is little better...

What are you using? Have you reached perfect loading time?

I am bored hearing all the time from drupalers and worpressers that their pages are loading perfect and fast...
If you do not programm your life, someone else will do it for you.
SMTP Newsletter APP: https://www.emailbat.com

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19659
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

Re: Optimizing Joomla page speed load

Post by dhuelsmann » Wed Jun 17, 2015 6:50 pm

Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org

User avatar
changlee
Joomla! Explorer
Joomla! Explorer
Posts: 470
Joined: Tue Nov 20, 2007 11:05 am
Location: Greece
Contact:

Re: Optimizing Joomla page speed load

Post by changlee » Thu Jun 18, 2015 11:20 am

Yes I already have read many times. That is what you follow exactly? Is that suitable for big sites?

Joomla gZip uses PHP and requires CPU. It is not suitable for big sites. So some .htaccess rules are making gZip from server direct, not from Joomla PHP.
If you do not programm your life, someone else will do it for you.
SMTP Newsletter APP: https://www.emailbat.com

User avatar
pranabmistry
Joomla! Explorer
Joomla! Explorer
Posts: 339
Joined: Sun Dec 07, 2014 4:51 pm
Location: Dhaka, Bangladesh
Contact:

Re: Optimizing Joomla page speed load

Post by pranabmistry » Fri Jul 31, 2015 6:04 pm

Cloudflare is the easiest solution to speed up a site to a visible level.
With Regards
Pranab Mistry

User avatar
changlee
Joomla! Explorer
Joomla! Explorer
Posts: 470
Joined: Tue Nov 20, 2007 11:05 am
Location: Greece
Contact:

Re: Optimizing Joomla page speed load

Post by changlee » Sun Aug 09, 2015 4:19 pm

Sure, but if you have a dedicated server that stuck with the joomla bad configured websites, then cloudflare will wait for your server...
If you do not programm your life, someone else will do it for you.
SMTP Newsletter APP: https://www.emailbat.com

almooj-craig
Joomla! Guru
Joomla! Guru
Posts: 500
Joined: Mon Aug 11, 2008 3:05 pm

Re: Optimizing Joomla page speed load

Post by almooj-craig » Wed Aug 19, 2015 3:31 pm

Changlee,
I have spend months and monhts trying to optimize my Joomla pages. I chose JCH with Joomla default cache plugin (including browser cache), Conservative Cache and gZip.
I think it might be better to have the browser cache time set using .htaccess or in the httpd.conf file if you are using Apache.

Have you also tried using the system page cache?

Perhaps for the static files that JCH creates there is an option to save a .gz version. Then if the users browser can receive a gzip file you just use mod_rewrite to serve the file directly. If not perhaps you could rewrite JCH a litle so that it also outputs a static file usng php's gzip level 9.

Using php to gZip the output on the fly would be slow, like you found Apache deflate is quicker.

Have you tried using JotCache? Perhaps there is an option to save page cached files in the .gz format, then if the browser accepts gzip files, you simply serve the cached .gz page directly. That would eliminate php gzip on the fly or Apache deflate. If that option isn't available you could rewrite it a little so that it also stores a static .gz file that's created using php.

I would be curious to see the webpagetest.org waterfall view of your site to see how quick the Start to Render time is. Usually taking a quick look at the waterfall tells you what problem your site is having.

Craig

jootify
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Thu Feb 13, 2014 3:42 pm

Re: Optimizing Joomla page speed load

Post by jootify » Wed Aug 26, 2015 11:59 am

Hi changlee,

This depend actually on your configuration,if you can detail the details of your dedicated webserver,the name of the website,i can help you.

I typically suggest disabling gzip compression because it uses a lot of CPU, and enabling cache.

If you want gzip,use this from .htaccess file :

Add the following code to your site’s .htaccess file:
"
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
"

The cache from joomla,is not so good,you should use this :http://extensions.joomla.org/extension/jotcache

Basically with it,and without no CDN,i reduced the time from an website from 20 seconds,to about 2-3 seconds.

If you use it and you tweak it up with Cloudflare,mostly you will even get more better results.

Jotcache config depends alot on your website,and what components are you using and so on,without an look around,i cannot tell you exactly what settings you might need.

Jotcache,the component works only for guest users (By Design) and will NOT work for logged-in users as logged-in users get more dynamic content that will make cache a bad option .

The Challenge is to get the best configuration for the Cache, which needs many trials and inspection to get the best results .

Jotcache also work with memcache,but it needs tweaks.

" I am bored hearing all the time from drupalers and worpressers that their pages are loading perfect and fast..."

Drupal loads more bad then joomla,wp is an little better but not too much,and that is when you compare them all without cache.

With cache you will get differently results,based on many things:webhosting provider,configurations,cdns,components,plugins used etc.

With joomla and the perfect tweaks,you will be able to load more fast that any wp or drupal website,but like i said,without knowing the whole theme,i cannot get into specific things.

User avatar
changlee
Joomla! Explorer
Joomla! Explorer
Posts: 470
Joined: Tue Nov 20, 2007 11:05 am
Location: Greece
Contact:

Re: Optimizing Joomla page speed load

Post by changlee » Sat Sep 12, 2015 8:09 am

I think we more close to what I am looking for :-)

The .htaccess calibration is giving much more better results. My server has fasten the response time 5 times!!!
If you do not programm your life, someone else will do it for you.
SMTP Newsletter APP: https://www.emailbat.com

jootify
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Thu Feb 13, 2014 3:42 pm

Re: Optimizing Joomla page speed load

Post by jootify » Sun Sep 13, 2015 2:27 pm

changless,so the .htaccess helped you?

It did solve your problem right now?

Hope your happy!

1040TaxBiz
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Sep 28, 2015 5:27 pm
Contact:

Re: Optimizing Joomla page speed load

Post by 1040TaxBiz » Mon Sep 28, 2015 5:46 pm

I have had issues optimizing Joomla. I manage numerous wordpress sites and some joomla sites, and joomla has much more overhead. I found that with some htaccess tweaks, and plugins that cache and combine CSS/js files, you will get better performance.

pduke24
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Thu Mar 05, 2015 12:07 am

Re: Optimizing Joomla page speed load

Post by pduke24 » Mon Sep 28, 2015 6:31 pm

If its a really big site then I guess you had lots of JS or css files. Have you heard of ScriptMerge plugin? It compresses all those files and only loads what is necessary.

Sometimes, your hosting could also play a big factor.

User avatar
changlee
Joomla! Explorer
Joomla! Explorer
Posts: 470
Joined: Tue Nov 20, 2007 11:05 am
Location: Greece
Contact:

Re: Optimizing Joomla page speed load

Post by changlee » Thu Oct 01, 2015 7:11 am

jootify wrote:changless,so the .htaccess helped you?

It did solve your problem right now?

Hope your happy!
Yes!

Until now, the best combination of Joomla - Server calibration I have tested is:

Joomla
- Minimise images, CSS, disable every useless plugin, and uninstall any useless component,
- Make the pages, especially the home page minimal , clean and light.
- Disable gZip, use only conservative cache and the page cache plugin.

Server
- Configure the firewall rules to block any unuseful visitor
- Use pagespeed and other modules through .htaccess
- Calibrate all the accounts to use specific power from MySQL, CPU and RAM according to their traffic needs.

That is my experience. I will be happy listen to yours, not theoretically.
If you do not programm your life, someone else will do it for you.
SMTP Newsletter APP: https://www.emailbat.com

almooj-craig
Joomla! Guru
Joomla! Guru
Posts: 500
Joined: Mon Aug 11, 2008 3:05 pm

Re: Optimizing Joomla page speed load

Post by almooj-craig » Fri Oct 02, 2015 1:44 am

Changlee,

How much did mod_pagespeed increase your pagespeed score? I usually just keep manually tweaking things until my score improves.

Craig

dezea
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Tue Mar 22, 2011 5:48 pm

Re: Optimizing Joomla page speed load

Post by dezea » Fri Oct 02, 2015 7:41 am

I don't recommend compressig gzip files on the fly (neither with a joomla plugin like JCH or with an Apache module). Both will consume CPU. A much better solution is to have your files already compressed in gzip, but also have them in js/css format. Then, instruct the Apache server via htaccess that when a browser supports gzip, it should serve the gzip version, when the browser doesnt support gzip, serve them the raw/uncompressed version. For this, you only have to add these lines at the end of your .htaccess:

#Serve gzip compressed CSS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.css $1\.css\.gz [QSA]

# Serve gzip compressed JS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.js $1\.js\.gz [QSA]

# Serve correct content types, and prevent mod_deflate double gzip.
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]

<FilesMatch ".gz$">
Header set Content-Encoding "gzip"
Header append Vary: Accept-Encoding
</FilesMatch>
Contact me via PM for Joomla developement, php coding, Joomla webpage speedup etc.
I'm also into making sick hip-hop beats, check them out

almooj-craig
Joomla! Guru
Joomla! Guru
Posts: 500
Joined: Mon Aug 11, 2008 3:05 pm

Re: Optimizing Joomla page speed load

Post by almooj-craig » Fri Oct 02, 2015 2:15 pm

Dezea,
I agree it's much better to pre gzip static assets ahead of time then just serve them out. This is what I use:

Code: Select all

ReWriteCond %{HTTP:accept-encoding} gzip
RewriteCond %{REQUEST_URI} \.(?:js|css|html?|txt)$ [NC]
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*\.(?:js|css|html?|txt))$ $1.gz [L]
Did you experement with -s and -f to see which is quicker? Also I have never had any problem with double encription. [QSA] preserves the query string, but doesn't Apache just do that by default. I know wordpress tends to specify the version in a query string which is not good, but I don't think joomla has started doing that.

Craig

User avatar
changlee
Joomla! Explorer
Joomla! Explorer
Posts: 470
Joined: Tue Nov 20, 2007 11:05 am
Location: Greece
Contact:

Re: Optimizing Joomla page speed load

Post by changlee » Sat Oct 10, 2015 9:38 am

I see that we are much more improved than the Joomla gzip ;-)

These solutions rock!
If you do not programm your life, someone else will do it for you.
SMTP Newsletter APP: https://www.emailbat.com

Hussain321
I've been banned!
Posts: 24
Joined: Sun Oct 25, 2015 1:06 pm

Re: Optimizing Joomla page speed load

Post by Hussain321 » Fri Oct 30, 2015 12:07 pm

For me, I prefer to use the .htaccess file first to address as much as possible of those speed factors. If there are remaining issues, then turning to use extensions is okay.


Locked

Return to “Performance - Joomla! 3.x”