Speed Up Your CS-Cart eCommerce Website - Step 1

Hello Stormbreaker,


[quote name=‘stormbreaker’]Hi thank you for the hints, the website is really faster now.

But I have a problem. I have some attachments (.pdf files mostly) and with the compression i’m not able anymore to open them or it requires more than 5 minutes to do it. I had to remove the gzip compression at the end of the day.



I had not the mod_deflate originally in Loaded Modules, but I followed the procedure and it worked.



Any idea?[/QUOTE]



Yes, I am stubborn:



[SIZE=“3”]A reliable web hosting company is necessary in business.[/SIZE]


[quote name=‘stormbreaker’]Hi thank you for the hints, the website is really faster now.

But I have a problem. I have some attachments (.pdf files mostly) and with the compression i’m not able anymore to open them or it requires more than 5 minutes to do it. I had to remove the gzip compression at the end of the day.



I had not the mod_deflate originally in Loaded Modules, but I followed the procedure and it worked.



Any idea?[/QUOTE]



Please, Stormbreaker, if you can afford it, choose another web hosting company. You are a new comer here, and you have a really stupid basic trouble. Believe me, to have NOT the mod_deflate is incredible in 2010!



Please, change for a reliable hosting company, otherwise, you will discourage quickly yourself.



*****



However, Stormbreaker, if “mod_deflate” is NOT enable, you can read this: Enabling gzip compression if mod_deflate is not enabled



*****



Seems your mod_deflate has been configured incorrectly. Please, ask help from your web hosting company.



Here is a fine configuration of deflate.conf (only root can be able to change it):



DeflateCompressionLevel 3



AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE application/x-httpd-eruby

SetOutputFilter DEFLATE

SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.avi$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mov$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mp4$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.rm$ no-gzip dont-vary

BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary




So, Stormbreaker, you can test this into your “.htaccess”:


```php

SetOutputFilter DEFLATE


compress content with type html, text, js, and css

AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript text/xml image/svg+xml application/javascript application/x-javascript application/atom_xml application/rss+xml application/xml application/xhtml+xml application/x-httpd-php application/x-httpd-fastphp


Properly handle old browsers that do not support compression

BrowserMatch ^Mozilla/4 gzip-only-text/html

BrowserMatch ^Mozilla/4.0[678] no-gzip

BrowserMatch \bMSIE !no-gzip !gzip-only-text/html


Explicitly exclude binary files from compression just in case

SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary

SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary

SetEnvIfNoCase Request_URI .pdf$ no-gzip dont-vary

SetEnvIfNoCase Request_URI .avi$ no-gzip dont-vary

SetEnvIfNoCase Request_URI .mov$ no-gzip dont-vary

SetEnvIfNoCase Request_URI .mp3$ no-gzip dont-vary

SetEnvIfNoCase Request_URI .mp4$ no-gzip dont-vary

SetEnvIfNoCase Request_URI .rm$ no-gzip dont-vary


properly handle requests coming from behind proxies

Header append Vary User-Agent env=!dont-vary

```





Lee Li Pop

Hello Clips,


[quote name=‘clips’]Does this just work for CS 2.? or does it work for 1.3.5 sp4?[/QUOTE]



Works for ALL website, with or without CS-Cart!





Lee Li Pop

Awesome… I may try this in the near future. I’m too scared to do anything around the holidays. :slight_smile:

Hi,



Just wanted to say a big thanks to Lee for all of these tips.



Has anyone tried out the Apache module created by Google. It’s supposed to automate some of the things that their Page Speed tool highlights.



Details here:- [url]http://googlecode.blogspot.com/2010/11/make-your-websites-run-faster.html[/url]

Also, has anyone had any experience with CloudFlare, [url]http://www.cloudflare.com/[/url]

I did try it on one of my other sites and it did seem to make a difference to load times.



It’s fairly easy to use, just need to change your DNS. I’ve not tried it with a CS Cart site as the free account can’t be used on sites that have SSL enabled.



So who’s going to be the guinepig and try either of these out :smiley:



John

I say a big round of applause for the lady in red for spending time to educate everyone with these things in such a constructive and amusing way.:slight_smile: :slight_smile: :slight_smile: :slight_smile:

[quote name=‘johnbol1’]I say a big round of applause for the lady in red for spending time to educate everyone with these things in such a constructive and amusing way.:slight_smile: [/QUOTE]



Hello John,



I’m embarrassed… :oops:



Thank you for your opinion, know that it affects me in a positive way. Especially since the search time of these tricks took me several weeks.



Thanks again!





Lee Li Pop

Hi



I want to say a big thank you to Lee Le Pop for the help.

I apologise for the 2 consecutive posts i wrote before, but i couldn’t see my post :frowning: so i wrote a second to check if it was my laptop problem.

I figured out what was the problem with the mod_deflate, we were runnig cs-cart on IIS6 server.

Now we moved on a Linux server, moved cs-cart in there and proceeded with the first phase tuning.



It works fine



Now I will go to next step



Thx again

We worked through this step and we notice the speed difference already. We also went from D’s and F’s to C’s. Still a few F’s on some of the items.

Thanks for the excellent advice!

Thanks so much Lee Li Pop, just tested my site and I was stunned! Went from C’s to A’s



Hello Cwpeter,


[quote name=‘cwpeter’]Thanks so much Lee Li Pop, just tested my site and I was stunned! Went from C’s to A’s



[/QUOTE]





Congratulations!



Wonderful with CS-CART: version 2.1.2 PROFESSIONAL!



I dream to succeed as you with 2.1.2…



Very hard work!





Lee Li Pop

Any idea if these changes add more strain on the ram?

Hello Clips,



Be aware… Cwpeter is NOT a newcomer in the field. He thanks me, but, if you take a look of the history of his Performance Report, you can understand what I said:



[url]http://gtmetrix.com/reports/www.nzperfume.com/BqkizOuY#report-history[/url]



His first Yslow was: 90



His first Page Speed was: 80



Basic “demo.cs-cart” results are:



Yslow: 67



Page Speed: 70



Cwpeter is nice to thank me, however, I know is more clever than me on the field



Nevertheless, Clips, if you follow my advices, you can do the same. And better with 2.1.2, because I get these results:



[SIZE=“3”]YSlow: 94



Page Speed: 95[/SIZE]




Steps are: Gzip + SmartOptimizer + Combination of every CSS files in only one + Combination of every JS files in only one



Nota Bene:



I have NO Content Distribution Network (CDN) and NONE special Apache tweaks, and ZERO optimized server settings, because I am on a shared server.



Of course, without any negative impact on the speed, stability, security (and more…) of the server.



So, Clips, you can do the same if you are ready!





Lee Li Pop

@clips - by definition, this will use a bit more RAM due to the pages being compressed before being sent. How much is more a function of the “compressability” of the page.



But I don’t think it should be an impact that you see. Given that the machine is a virtual memory machine, you can probably run some system tools to determine what the big memory processes are. My bet is that httpd is NOT one of them…



What specifically are you seeing. I know in another post you also metioned ram issues but I’m not really sure what you mean by that. Is your server shared, dedicated? What OS? How much RAM? What size of a paging file do you have configured?

[quote name=‘tbirnseth’]… Is your server shared, dedicated? What OS? How much RAM? What size of a paging file do you have configured?[/QUOTE]

Our server is a VPS.

OS = CentOS Linux 5.x

Everything was going along really smooth on the server. Then I made a few changes on Jan. 5 and added the Help Desk and my server started “Ooming”.

The only changes I made were in trying to speed up the site, change the skin (from other link) and added the Help Desk. Right now the site is no longer Ooming as it was doing on a daily basis for the last few days. I have turn the Help Desk on and there are no new “Ooming” problems there yet. I did not turn off or change any of the “cache” stuff here. At this point I am going to assume that the {debug} code that I put on the “my_changes” file was killing resources and causing the server to “Oom” and start killing off processes.



So again, I do NOT believe any of the changes made in this thread caused any problems. Sorry to have bothered.

That’s not much RAM…

Yep, it is smaller than we normally have…but normally we have the “burstable” that is much higher too, but this host believes that “burstable” ram is a bad thing. I’m sure about half the people here on the forum would say one thing and the rest would say something else. Our current host says it is “guaranteed” RAM. I even notice on the packages you offer on your site that you don’t show how much RAM is guaranteed. It seems everyone kind of does their own thing. The main thing is we easily survived the month of December (with just under 1000 orders on the server) and didn’t hit the “Ooming” until something I did Jan. 5th.



To be honest, we are still testing out the hosting world as we’ve been burned recently. We are somewhat pleased so far with our current host, but still extremely cautious.



The good part is on this host I was able to follow the advice of this thread and speed up my sites. With the host I had a few months ago I had major problems with speed.

[quote]

I even notice on the packages you offer on your site that you don’t show how much RAM is guaranteed.

[/quote]

I don’t provide VPS’s. My clients are all on virtual servers and it is my responsibility to ensure that the underlying server has the resources necessary to support their stores in a performant manner.

Just wanted to say “Thank You” to everyone… Especially Lee Li Pop… Our site on gtmetrix.com



Before mod_deflate and SO…

66% / 73%



Now with changes done…

82% / 80%



Very noticeable difference… Thank You…



Genie

CarStickersDecals

Hello Genie,


[quote name=‘CarStickersDecals’]Just wanted to say “Thank You” to everyone… Especially Lee Li Pop… Our site on gtmetrix.com



Before mod_deflate and SO…

66% / 73%



Now with changes done…

82% / 80%



Very noticeable difference… Thank You…



Genie

CarStickersDecals[/QUOTE]



Thank you!



However, you can go higher to following my others steps:



Step 1 - Gzip (this one)

Step 2 - SmartOptimizer

Step 3 - Minify CSS + Do the same with Java Script files with this tool: JSCompress. Please, select “Minify (JSMin)” option.

Step 4 - Combine CSS + Do the same with Java Script files

Step 5 - .htaccess



Yes, by applying all the advice from these 7 steps (5 steps + 2 additional steps for Java Script files), you can easily get a score above 90 with CS-Cart 2.1.2, as I did:



[url]http://forum.cs-cart.com/showthread.php?p=106770#post106770[/url]





Lee Li Pop

[quote name=‘Lee Li Pop’]I get these results:



[SIZE=“3”]YSlow: 94



Page Speed: 95[/SIZE]




Lee Li Pop[/QUOTE]



You see? You ARE the Speedmeister!