Tips for making Joomla site Faster

196 views
Skip to first unread message

Alwin Augustin

unread,
Nov 3, 2010, 2:40:09 AM11/3/10
to joomla-de...@googlegroups.com
It will be helpful if anyone can tell me how we can make the Joomla site faster..? We need to install any extensions for that ..? or simply enabling the cache will do the task.. I am working on quite a large site and it is taking much time than expected.

MOHAMED ISMAIL

unread,
Nov 3, 2010, 2:46:28 AM11/3/10
to joomla-de...@googlegroups.com
I am also facing this problem. I feel it much slower. I think no extensions for fast up. Enable the catch.

On Wed, Nov 3, 2010 at 12:10 PM, Alwin Augustin <alwin.d...@gmail.com> wrote:
It will be helpful if anyone can tell me how we can make the Joomla site faster..? We need to install any extensions for that ..? or simply enabling the cache will do the task.. I am working on quite a large site and it is taking much time than expected.

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

MOHAMED ISMAIL

unread,
Nov 3, 2010, 2:47:13 AM11/3/10
to joomla-de...@googlegroups.com

saurabh shah

unread,
Nov 3, 2010, 2:49:32 AM11/3/10
to joomla-de...@googlegroups.com
Hi Alwin,

You can check jFinalizer which is a good plugin for optimizing , which i am unsing for the sites  : http://extensions.joomla.org/extensions/site-management/site-performance/11366
You can check more extentions here : http://extensions.joomla.org/extensions/site-management/site-performance

On 3 November 2010 12:10, Alwin Augustin <alwin.d...@gmail.com> wrote:
It will be helpful if anyone can tell me how we can make the Joomla site faster..? We need to install any extensions for that ..? or simply enabling the cache will do the task.. I am working on quite a large site and it is taking much time than expected.
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.



--
Thanks and regards,
Saurabh Shah
Contact Me LinkedIn Facebook Twitter
Chat Google Talk/ shahsaurabh164 Skype/ saurabh.ds16

Russell Winter

unread,
Nov 3, 2010, 3:24:05 AM11/3/10
to joomla-de...@googlegroups.com
Hmmmmm.....

Choose optimised extensions, optimised SQL, optimised templates, optimised Graphics, optimised CSS (not too many files, no unused elements, compressed, limit the use of unnecessary large JS libraries.... stick to the age old rules "don't over do it" & "don't fill the site with unnecessary cr*p", use good or optimised hosting.

There is nothing like good design, good planning, good layout and forward thinking....

There is no "Golden Bullet" for performance, but if you are using Shared Hosting, including Cloud offerings, then you are tied to their delivery and configuration choices, if it is essential for your site to perform 'above average' get a good systems administrator, good server, well configured platform and do it yourself.

Multiple entry delivery points is a good idea in 'some' cases. so CDN Cloud and Cache "can" improve performance due to the intrinsic inbuilt multiple entry and delivery points, but this also depends on how the CDN, Cloud and Cache are configured.

Consider hardware configurations, Storage RAID types, Server Bus technology, IP SAN, FC SAN, iSCSI delivery of files.  It's not as simple as saying "What Extension to install" or "How to configure"  There are many variables for specific site and data content types.

Joseph LeBlanc

unread,
Nov 3, 2010, 10:56:10 AM11/3/10
to joomla-de...@googlegroups.com
I agree with Russell, there's no single thing you do install that unilaterally makes your site faster.

However, as a general strategy, I find that it's helpful to start with the hosting and work your way up. If you're working with slow or shared hosting, no amount of image size reducing or compression is going to help speed up the backend. The easiest way of speeding up the backend is to get your site on a VPS or dedicated machine that has access to advanced caching systems like XCache. Using XCache will not only cache your content, but will also keep the Joomla PHP code itself in RAM so that you're not re-parsing the code for each request.

-Joe

Alwin Augustin

unread,
Nov 11, 2010, 5:23:56 AM11/11/10
to joomla-de...@googlegroups.com
Thanks Russel and Joe..!!


Alwin Augustin
Joomla Developer

+919037548280

http://www.joomlabasics.co.cc/

My profiles: Facebook LinkedIn Twitter
Contact me: Google Talk/ alwinaugustin Skype/ alwinaugustin Y! messenger/ alwin.augustin AIM/ alwinaugustin

Nick Weavers

unread,
Nov 11, 2010, 7:37:35 AM11/11/10
to Joomla! General Development
I don't claim to be an expert, but here's my 2 cent's worth...

One thing I have found very useful is the Google Pagespeed plugin for
Firefox. When installed you'll find a new tab in the Firebug
extension's panel. This gives you a score out of 100 as to how your
page is performing, and gives you a breakdown of what is slowing your
site down, prioritising the worst things first.

Also, if you use the Net tab you will see a cascade graph of the
things being loaded on your page. If you start with your Joomla
homepage you can analyse this a determine what elements are taking the
longest. It breaks each down to show when the initial request is made,
how long it spends waiting, and how long it spends loading. So,
looking at the first line you can see the request being made for the
main URL and the purple block which is called "Waiting" shows how long
you browser spent waiting for a response. This time is how long it
took your server (running the php interpreter and doing MySQL queries)
to build the HTML. If this is where a large percentage of the time is
being used, then you would attack this using the methods mentioned in
earlier posts (php accelerators that cache php pcode, and by using the
tools in MySQL to optimise tables and queries). looking at the lines
below this one you'll see that as a result of the main HTML being
loaded, a whole slew of requests is made for all the js/css/images
referenced in that HTML. If you find a lot of time is spent on html/js/
css you could do some quick and cheap things like telling your server
to use gzip (Apache 1.3) or deflate (Apache 2.0) on things that have
lots of white space in them, such as html/css/js, and to extend the
cache times for things like images that probably don't change too
often. This can be done using a .htaccess file which contains lines
similar to those given in the example below:

<IfModule mod_deflate.c>
# 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
</IfModule>

<IfModule mod_expires.c>
#extend cache times for images
ExpiresActive On
ExpiresByType image/gif "now plus 2 weeks"
ExpiresByType image/png "now plus 2 weeks"
ExpiresByType image/jpeg "now plus 2 weeks"
ExpiresByType image/x-icon "now plus 2 weeks"
ExpiresByType text/css "now plus 1 week"
ExpiresByType text/javascript "now plus 1 week"
ExpiresByType application/x-javascript "now plus 1 week"
</IfModule>

To check that the compression is working go here http://www.whatsmyip.org/http_compression/
and type in your URL.

Another useful site that can show you how quickly your web pages load
from other countries around the world is: http://www.webpagetest.org

Lastly, you have probably seen the announcement from Google about
their new Apache module called mod_pagespeed. If you have your own
dedicated server, you might want to play with this. It looks powerful,
but is still immature and lots of bugs/problems are surfacing.
However, it is giving good results for some. I am finding it tricky to
set up on our server as we use vhost'ing for our clients. It's not
clear to me yet how best to configure it in this environment. If
anyone has done this I would be grateful for their advice.

Nick Weavers
www.siteweavers.co.uk

Brad Gies

unread,
Nov 11, 2010, 1:06:21 PM11/11/10
to joomla-de...@googlegroups.com

I'll second the "Google Pagespeed" plugin as very useful... and the 1.9
version added several more useful features.

One thing that it identifies constantly on my pages (and it looks like
the biggest single thing I can improve right now) is the expiration time
of images, .js files, .css files, and the truth is that I don't know how
to specify that. I don't use caching, so that's not an option.

Anyone know if there is anything in Joomla core that will do it for the
Joomla stuff? If not, it's definitely something that should be there. I
also don't know how to specify it for my own files... anyone know?


Sincerely,

Brad Gies
-----------------------------------------------------------------------
Bistro Bot - Bistro Blurb
http://bgies.com http://nocrappyapps.com
http://bistroblurb.com http://forcethetruth.com
http://ihottonight.com
-----------------------------------------------------------------------
Everything in moderation, including abstinence (paraphrased)

Every person is born with a brain... Those who use it well are the successful happy ones - Brad Gies

Adversity can make or break you... It's your choice... Choose wisely - Brad Gies

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead

Nick Weavers

unread,
Nov 11, 2010, 8:15:27 PM11/11/10
to Joomla! General Development

> One thing that it identifies constantly on my pages (and it looks like
> the biggest single thing I can improve right now) is the expiration time
> of images, .js files, .css files, and the truth is that I don't know how
> to specify that. I don't use caching, so that's not an option.

Brad,

When you say you don't use caching, I'm not sure what you mean here,
so forgive me if I have misunderstood, but your browser is doing
caching too, and by using the settings in .htaccess for mod_expires
you are telling it to add information to the headers of the mime types
you choose which instructs the browser not to bother requesting a copy
of a file with that type if it already has one and the time that has
elapsed since it first got it is less than the time specified in the
ExpiresByType stanza.

apache.org probably say it a lot more clearly than I can. This is from
their web page:
"This module controls the setting of the Expires HTTP header and the
max-age directive of the Cache-Control HTTP header in server
responses. The expiration date can set to be relative to either the
time the source file was last modified, or to the time of the client
access.

These HTTP headers are an instruction to the client about the
document's validity and persistence. If cached, the document may be
fetched from the cache rather than from the source until this time has
passed. After that, the cache copy is considered "expired" and
invalid, and a new copy must be obtained from the source." (See
http://httpd.apache.org/docs/current/mod/mod_expires.html).

I'm not sure what type of hosting you have but I believe most base
installations of Apache 2.2 and higher are likely to have mod_deflate
and mod_expires, so you should just be able to try creating
a .htaccess file in the root directory of your Joomla install (mine is
usually cms) and just drop in the lines I gave in my earlier post,
then tweak the settings to suit.

I have seen the mod_deflate/mod_expires combo halve the load times of
both Joomla and Magento sites.

With dynamic sites there will be cases where js and css as well as
html files are created dynamically by the server side application
(factory patterns) and they will (hopefully) generate their own
headers for those using various settings (example php below) to cater
for different browsers and intervening proxy servers to make sure they
aren't cached en route or at the destination. I believe mod_expires
should not alter any existing cache expiry times it finds in headers
that were added by the application so it is safe to use.

<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');
?>

As I said, I am still learning about this stuff and am definitely not
an expert so if anything I have said is incorrect I hope someone will
correct me.

Nick Weavers
www.siteweavers.co.uk

Brad Gies

unread,
Nov 12, 2010, 6:49:43 PM11/12/10
to joomla-de...@googlegroups.com
Sorry to leave this so long... I got a little swamped with new stuff to
do....

I mean that I can't cache my pages at all. I have stuff that needs to
change on almost every page view. I think caching pages would almost
solve the issue, but I just can't use it. I also don't use an .htaccess
file... but that's a minor issue because I think everything you can do
in an .htaccess file can be done in the virtual directory settings or
php/apache settings.

I'd really like to be able to set the expires time on a file by file
basis. I think I could set it sitewide for images, but for .css and .js
files, I'm always tweaking the site so for my custom .css, .js files I
would do something like set the expires time to 3 hours. Then when I
want to upload changes (several times a week), I could set it to
no-cache, wait 3 hours, upload the changes, and reset the expires time
to 3 hours.

For the Joomla and 3p extension .css and .js files, I'd like the expires
time to be set much higher.. anywhere from 1 day to 1 week.

If the only way to do it is site-wide then I'd probably set it at 3
hours for everything because that's way more than enough for all but die
hard users (and I don't have that many of them).

It's definitely an area that I'm not familiar enough with, so I know I
need to do some reading... but I was hoping that Joomla! had something
in place to help out already :). Does it?

Sincerely,

Brad Gies
-----------------------------------------------------------------------
Bistro Bot - Bistro Blurb
http://bgies.com http://nocrappyapps.com
http://bistroblurb.com http://forcethetruth.com
http://ihottonight.com
-----------------------------------------------------------------------
Everything in moderation, including abstinence (paraphrased)

Every person is born with a brain... Those who use it well are the successful happy ones - Brad Gies

Adversity can make or break you... It's your choice... Choose wisely - Brad Gies

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead

Nick Weavers

unread,
Nov 13, 2010, 3:49:35 AM11/13/10
to Joomla! General Development
>I also don't use an .htaccess
>file...

Is that just a personal choice, or is there some system/application
constraint?

>I'd really like to be able to set the expires time on a file by file
>basis.

Just and idea, and I'm sure not a new one; PHP can be set up to work
on any file type, so if you told it to also parse .jss and .css you
could add a small amount of php code at the top of your css which
would look at an environmental variable called, say, DEV_ON and add
headers to force caching off when its value is true.
I'm not sure what the time penalty would be having php read all css
and js files first, but I expect it would be pretty small

Nick Weavers
www.siteweavers.co.uk

Ian MacLennan

unread,
Nov 13, 2010, 3:49:24 PM11/13/10
to joomla-de...@googlegroups.com
I would think you're going incur a rather significant performance hit by having PHP parse all of your CSS and JS files.  My gut tells me it certainly would (at least) negate any performance gain you'd get from caching.  Parsing a file using PHP is a lot more expensive that just letting Apache server a static file.

Ian




Nick Weavers
www.siteweavers.co.uk

francesco perillo

unread,
Nov 13, 2010, 5:13:19 PM11/13/10
to joomla-de...@googlegroups.com
> I'd really like to be able to set the expires time on a file by file basis.
> I think I could set it sitewide for images, but for .css and .js files, I'm
> always tweaking the site so for my custom .css, .js files I would do
> something like set the expires time to 3 hours.

A possible solution is to add "versioning" to the file. for example,
you have a reference in your html to "main.css".
You may add a expire header of 3 years. Then if you need to change it,
rename to main-001.css and change html accordingly, and then to
main-002.css (be sure to not delete the old files).

If you check google home page you will find, for example, nav_logo26.png


Caching... caching the while page is not the only solution. Sometimes
it's good to cache just part of it... how, it depends on the data you
have and what you want to show on screen...

Reply all
Reply to author
Forward
0 new messages