How to Speed Up and Optimise CS-Cart Version 4?

Hi,

Although some user reported page speed performace improvements on version 4, my out of the box demo got really bad result on GtMetrix. Webmaster Tools also reported high response time pages in my sitemap.



GtMetrix:

Page Speed Grade: F

Yslow: C

Page load time: [color=#ff0000]6.44s[/color]


[quote]

WT: [color=#000000][font=Arial, sans-serif][size=3]Some URLs listed in this Sitemap have a high response time.[/size][/font][/color]

[/quote]



Do you have the same problem? Did someone speed improvements for version 4 like in this post for version 3? Please share if you have any idea.

My personal experience is version 4 is not faster than 3, specially backend. My backend takes 3-4 seconds no matter what I click on. I have VDS with couple of other sites on it which work very fast and have no CDN. Does anyone know the best setting for “cache backend”? // Available backends: file, sqlite, database, redis



Perhaps there are some additional tweaks but I have implemented some.



in config_local.php



'gzip_css_js' => true, // gzip compiled css/js files



Also I have CDN with Amazon working. Home Page load is still 4.84 seconds according to GtMetrix Page Speed B 86% YS Slow 85%



But my old 3.06 store scored the same without CDN.

have you tried smart optimizer



John

[quote name='johnbol1' timestamp='1380913738' post='169192']

have you tried smart optimizer



John

[/quote]



I did John but it throws an error so unable to use it unless someone knows how to fix that. SmartOptimizer worked very well for my version 3.6 site but not working on 4.02


SmartOptimizer Error: File not found (../var/cache/misc/statics/js/tygh/scripts-2afd9d82015fdddf2f792e2f0a92ce401380919217.js).

clear the folder [color=#666600][size=2]/[/size][/color][color=#000088][size=2]var[/size][/color][color=#666600][size=2]/[/size][/color][color=#000000][size=2]cache[/size][/color][color=#666600][size=2]/ [/size][/color]via ftp and try again, also I had to disable the smart optimizer .htaccess in its own folder as per the instructions from the site.



JOhn

Still unable to get it working. Is it working on your version 4 site John?

any other idea? version 4 is still very slow. :(

[quote name='Ausy' timestamp='1380976326' post='169220']

Still unable to get it working. Is it working on your version 4 site John?

[/quote]





Sorry for late reply travelling at the moment I am just in the process of installing v4 but dont see why smart optimizer wont work. Did make a difference on my previous versions. Just FYI out of the box fresh install of v4 on my sub domain with just demo products is B & B on gt metrix.

I will try SO when I get back and let you know

I just test my site with cs-cart 4.0.2



Page Speed Grade:A

AYSlow Grade:A

Page load time: 3.67s

Total page size: 339KB

Total number of requests: 27



I have about 130k products and 4k categories and after upgrade to version 4.0.2 I realy see faster site loading.

I'm also looking information about it. my store is very slow too…

[quote name=‘kjpp’ timestamp=‘1381163358’ post=‘169314’]

Total page size: 339KB

[/quote]

Hmm, it is very interesting. On my site (4.0.1) only these two files are more than 770 KB. How can it be? :confused: I made some css modifications, that’s all.[list]

[]473KB - /var/cache/misc/statics/js/tygh/scripts-0b4ed0f204565d4856b8c219abea2695.js?ver=4.0.1

[
]303 KB - /var/cache/misc/statics/design/themes/basic/css/standalone.af70e58d92213bf3480554ac8000395a.css

[/list]

Are these config options available in version 4?



[color=#000000]$config[/color][color=#666600][[/color][color=#008800]'tweaks'[/color][color=#666600]][/color][color=#000000] [/color][color=#666600]=[/color][color=#000000] array [/color][color=#666600]([/color]

[color=#008800]'js_compression'[/color][color=#000000] [/color][color=#666600]=>[/color][color=#000000] [/color][color=#000088]true[/color][color=#666600],[/color][color=#000000] [/color][color=#880000]// enables compession to reduce size of javascript files[/color]

[color=#008800]'check_templates'[/color][color=#000000] [/color][color=#666600]=>[/color][color=#000000] [/color][color=#000088]false[/color][color=#666600],[/color][color=#000000] [/color][color=#880000]// disables templates checking to improve template engine speed[/color]

[color=#008800]'inline_compilation'[/color][color=#000000] [/color][color=#666600]=>[/color][color=#000000] [/color][color=#000088]true[/color][color=#666600],[/color][color=#000000] [/color][color=#880000]// compiles nested templates in one file[/color]

[color=#008800]'anti_csrf'[/color][color=#000000] [/color][color=#666600]=>[/color][color=#000000] [/color][color=#000088]false[/color][color=#666600],[/color][color=#000000] [/color][color=#880000]// protect forms from CSRF attacks[/color]

[color=#008800]'disable_block_cache'[/color][color=#000000] [/color][color=#666600]=>[/color][color=#000000] [/color][color=#000088]true[/color][color=#666600],[/color][color=#000000] [/color][color=#880000]// used to disable block cache[/color]

[color=#008800]'join_css'[/color][color=#000000] [/color][color=#666600]=>[/color][color=#000000] [/color][color=#000088]true[/color][color=#666600],[/color][color=#000000] [/color][color=#880000]// is used to unite css files into one file[/color]

[color=#008800]'allow_php_in_templates'[/color][color=#000000] [/color][color=#666600]=>[/color][color=#000000] [/color][color=#000088]false[/color][color=#666600],[/color][color=#000000] [/color][color=#880000]// Allow to use {php} tags in templates[/color]

[color=#008800]'disable_localizations'[/color][color=#000000] [/color][color=#666600]=>[/color][color=#000000] [/color][color=#000088]true[/color][color=#666600],[/color][color=#000000] [/color][color=#880000]// Disable Localizations functionality[/color]

[color=#008800]'disable_google_base'[/color][color=#000000] [/color][color=#666600]=>[/color][color=#000000] [/color][color=#000088]true[/color][color=#666600],[/color][color=#000000] [/color][color=#880000]//Disable obsolete google base functionality[/color]

[color=#666600]);[/color]

I upgraded to [color=#282828][font=arial, verdana, tahoma, sans-serif]4.0.2 and it has a much better speed. :)[/font][/color]

[quote name=‘nattila’ timestamp=‘1383564469’ post=‘170926’]

I upgraded to [color=#282828][font=arial, verdana, tahoma, sans-serif]4.0.2 and it has a much better speed. :)[/font][/color]

[/quote]

with some tuning could be faster

up

up

config.local.php has one option in 4.x - when set to true it did nothing to my GtMetrix scores of 70 page speed, 77 yslow - 'gzip_css_js' => true // gzip compiled css/js files



With 4.x do make sure you have Development Settings OFF in Design > Template Editor > Development Settings. The admin nags you if you leave them on so I doubt it's issue for anyone.



Major speed increase - I added the compression and header expire code below to my .htaccess and my score went to 99 page speed, 89 Yslow. Expires date needs to manually changed. Feels good but the question would be what impact could this have on site features and functionality?




#Expires

Header set Expires "Thu, 15 Apr 2015 20:00:00 GMT"
Header unset ETag
FileETag None


#Gzip

AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript

Grafis, thanks for share that codes! help me to improve my Expires headers!

the only problem that I have now is this:



Remove query strings from static resources



***/var/cache/misc/statics/js/tygh/scripts-31039xxxxxxxxxx.js[color=#ff0000]?ver=4.0.3[/color]

***/js/tygh/exceptions.js[color=#ff0000]?ver=4.0.3[/color]

***/js/tygh/product_image_gallery.js[color=#ff0000]?ver=4.0.3[/color]



Specify a cache validator



***/js/lib/jcarousel/jquery.jcarousel.js

***/js/tygh/exceptions.js[color=#ff0000]?ver=4.0.3[/color]

***/js/tygh/product_image_gallery.js[color=#ff0000]?ver=4.0.3[/color]



Someone know how can I remove those “[color=#FF0000]?ver=4.0.3[/color]”?



btw, my score now in gtmetrix:







not bad huh? 8) I’m using the cdn service with Amazon cloudfront.

I haven't been able to figure out how to do expires for objects with a variable like CS-Cart JS files - ?ver=4.0.3



I did find this well documented example with near future expire dates that magically adjust (my example code above has fixed dates). Seems to give about the same results. http://magazine.joom…t-FREAKIN-Works

[quote name='grafis' timestamp='1389537874' post='174963']

config.local.php has one option in 4.x - when set to true it did nothing to my GtMetrix scores of 70 page speed, 77 yslow - 'gzip_css_js' => true // gzip compiled css/js files



With 4.x do make sure you have Development Settings OFF in Design > Template Editor > Development Settings. The admin nags you if you leave them on so I doubt it's issue for anyone.



Major speed increase - I added the compression and header expire code below to my .htaccess and my score went to 99 page speed, 89 Yslow. Expires date needs to manually changed. Feels good but the question would be what impact could this have on site features and functionality?




#Expires

Header set Expires "Thu, 15 Apr 2015 20:00:00 GMT"
Header unset ETag
FileETag None


#Gzip

AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript


[/quote]



I just added this code to my website and it cuts the page load time in HALF! Thank you!