My website is slow, what do you suggest?

Permalink
My website can be very slow when moving between pages. I contacted our internet service provider and mentioned that we were using Concrete. He said something like “Concrete uses databases and you need to optimize them.” He said it was pretty simple. Does anyone have any suggestions?

Thanks,

 
nteaviation replied on at Permalink Best Answer Reply
nteaviation
I seriously doubt optimizing MySQL will make any difference, considering the reletively small amount of data stored in MySQL by Concrete5. I would suspicion inadequate bandwidth or hardware resources on your web host's server. IMHO
Remo replied on at Permalink Reply
Remo
I agree, just adding a bunch of indexes doesn't really help.

It's a fact that concrete5 needs a bit of resources due to the flexibility you get with blocks and attributes (among other things).

If you can, try to play around with the basic or even full page cache, check if you can use something like apc and it that still doesn't help, compare the current hosting with another hosting. I've seen a lot of differences between hosting plans..
Garret replied on at Permalink Reply
Thank you for the help. This makes sense.

Garret
frankdesign replied on at Permalink Reply
Add the code below to your .htaccess file. If you have the required module installed on your server then this will speed up your site.

Our sites are now blisteringly fast! (Make sure you copy all of it)

<IfModule mod_deflate.c>
############################################
## enable apache served files compression
##http://developer.yahoo.com/performance/rules.html#gzip...
    # Insert filter on selected content types only
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
    # Netscape 4.x has some problems...
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    # Netscape 4.06-4.08 have some more problems
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    # MSIE masquerades as Netscape, but it is fine
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    # Don't compress images
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
</IfModule>
thebigideasman replied on at Permalink Reply
thebigideasman
@frankdesign I have a similar problem with one of my websiteshttp://www.fremingtoncommunity.com/... and this looks like it could be the perfect solution to speed up the load time of the site. But can you please tell me exactly where I put it on the .htaccess file - do I replace all the code that is there with yours, or paste in-between the existing code in this file?

Thanks David
JohntheFish replied on at Permalink Reply
JohntheFish
You would insert the code somewhere within the existing .htaccess. Ideally before the c5 rules for pretty urls because they are easier to keep track of if they are at the end.

However, you mentioned 1&1 shared hosting on another post. I have not tried it, but suspect adding such htaccess lines on a 1&1 shared hosting package would either be ignored or break the site (which is what has happened when I have tried adding anything beyond rewrites and redirects). So make a backup of the htaccess file before editing, and be prepared to swap it back if the rules are a disaster.
thebigideasman replied on at Permalink Reply
thebigideasman
Good advice and thanks again.
jordanlev replied on at Permalink Reply
jordanlev
Also check out this tip: results in dramatic performance increase in some situations:
http://andrewembler.com/posts/improving-the-performance-of-zend-cac...

Also also search the forums for the MISER plugin... that helps a lot too.
jordanlev replied on at Permalink Reply
jordanlev
I agree with the sentiments of everyone else who responded: it is very unlikely that the slowdown is a result of MySQL (if it is, then the web host has seriously misconfigured their server or has over-loaded them with too many customer accounts per machine).

There is a fairly easy way to check if the slowdown is mostly due to the system (running the php code, doing the MySQL queries, etc.), versus the time it takes to send the page and all of its images and CSS and Javascript etc. files to you -- go tohttp://www.webpagetest.org/ and when the test has completed, look for the "first byte" number -- this is how long it takes all the PHP code and MySQL queries to run on the server. You can also use Firebug (for firefox) or Web Inspector (for chrome or safari) and look at the "Net" panel for more details about specific files (it will show you a chart of how long it takes for different things to load).

So... if you find that (as is usually the case) the slowdown is in sending the various page items, I've found the "MISER" addon to be extremely helpful in addressing speed concerns:http://www.concrete5.org/community/forums/customizing_c5/miser-web-site-optimiser/

Also, enabling gzip compression will speed things up too (if it's not already enabled) -- this is what @frankdesign's htaccess code does -- although it looks different to me than the code I usually use for this purpose. You might want to look at this instead:
http://www.concrete5.org/community/forums/jobs1/seo-and-speed-enhan...

And there's also things you can do with header cache (also in the htaccess file) -- this is more on the advanced/complicated side, but this site does a good job of explaining it I think:
http://betterexplained.com/articles/how-to-optimize-your-site-with-...

Best of luck.

-Jordan