Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Speed Up and Optimise CS-Cart Version 3 Rate Topic   * * * * * 9 votes

 
  • miracles
  • Senior Member
  • Members
  • Join Date: 19-Sep 07
  • 1533 posts

Posted 28 January 2013 - 04:42 AM #41

Can you let us know your optimization in .htaccess and smartoptimizer file ?

Can you also tell us how can i give defar parse on these links


http://domain.com/lib/js/jqueryui/jquery-ui.custom.min.js (142.1KiB)
http://domain.com/lib/js/jquery/jquery.min.js (77.4KiB)
http://domain.com/ (3.8KiB of inline JavaScript)
http://domain.com/lib/js/tools/tooltip.min.js (2.9KiB)
http://domain.com/skins/plug_buy/customer/addons/iecsp_lazy_loader/js/lazyload.js (1.7KiB)
http://domain.com/lib/js/appear/jquery.appear-1.1.1.js (1.5KiB)
http://domain.com/addons/magiczoom/func.js (358B)
http://domain.com/var/cache/templates/js/core1.js (348B)
http://domain.com/addons/magiczoom/ajax_packed.js (347B)
http://domain.com/addons/magiczoom/core/magiczoom.js (347B)
http://domain.com/var/cache/templates/addons/autosuggest/js/func.js (347B)
http://domain.com/var/cache/templates/addons/buy_together/js/func.js (347B)
http://domain.com/var/cache/templates/addons/esp/js/func.js (347B)
http://domain.com/var/cache/templates/js/editors/tinymce.editor.js (347B)
http://domain.com/var/cache/templates/addons/banners/js/slider.js (346B)
http://domain.com/var/cache/templates/addons/news_and_emails/js/func.js (346B)
http://domain.com/skins/plug_buy/customer/js/scripts.js (155B)

CS-CART 3.0.6 GRENADE

Please vote for CDN Add-on

For SEO Article Submission, Forum Profile Links, Web 2.0 links, contact me through PM.

 

Posted 28 January 2013 - 04:54 PM #42

I have done all the changes mentioned here and now get a B & B rating at GTmetrix from a F & D http://gtmetrix.com/...nt.com/49rHYk1k
I also move to the fastest plan my host has. Yet some of my customers it still takes 15 seconds to add to the cart (down from 55 seconds). I can't recreate this and neither can CS-Cart or my host yet I'm having a lot of customers complaining about this problem.
Any one have any idea what the problem might be?
I'm using CS-Cart 3.05.
Here's my site http://www.compactdiscount.com

 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 28 January 2013 - 06:35 PM #43

@ miracles

CS-Cart uses a variable include for these scripts so it is not as simple as adding 'defer async' to the include script as these are stripped out, which I am working on a solution to. Alternatively, depending on your skin which may be different, you could move the placement of the following:

/skins/yourskin/customer/index.tpl (seems to be the most common location for this piece of code, although your skin may vary)

{include file="common_templates/scripts.tpl"}
Move this code from within the head tag to below the closing body tag. Refresh your cache. I have done this on one site and noticed no adverse effects in terms of functionality, but page load times increased by approximately 4 seconds. Of course, using 'defer' on specific scripts would be far better.

@ Compact Discount

I've just had a look at your site, you appear not to be using any intensive features, such as complex product options, features nor filters, so I see no reason as to why your 'add to cart' can be slow. I tested it and the pop-up after clicking 'add to cart' appeared in not much more than one second. Do those who have complained about the 'add to cart' being slow also find browsing between categories and products slow to load pages, or only the 'add to cart'? Your site doesn't appear at the moment to be any different to the load times of the CS-Cart Demo. You also don't have a lot of products, so would assume your current traffic isn't causing peaks on the server hardware, the current users in the bottom-right of your admin panel shows, I think, the last 5 minutes of activity. The site I am currently optimising is fast on all page loads and slightly quicker than your 'add to cart' even with options, but not by a great deal, although the site is on a fairly high spec dedicated server.
Hire StellarBytes for CS-Cart Design & Development Services

 

Posted 28 January 2013 - 08:04 PM #44

@ miracles

CS-Cart uses a variable include for these scripts so it is not as simple as adding 'defer async' to the include script as these are stripped out, which I am working on a solution to. Alternatively, depending on your skin which may be different, you could move the placement of the following:

/skins/yourskin/customer/index.tpl (seems to be the most common location for this piece of code, although your skin may vary)

{include file="common_templates/scripts.tpl"}
Move this code from within the to below the closing tag. Refresh your cache. I have done this on one site and noticed no adverse effects in terms of functionality, but page load times increased by approximately 4 seconds. Of course, using 'defer' on specific scripts would be far better.

@ Compact Discount

I've just had a look at your site, you appear not to be using any intensive features, such as complex product options, features nor filters, so I see no reason as to why your 'add to cart' can be slow. I tested it and the pop-up after clicking 'add to cart' appeared in not much more than one second. Do those who have complained about the 'add to cart' being slow also find browsing between categories and products slow to load pages, or only the 'add to cart'? Your site doesn't appear at the moment to be any different to the load times of the CS-Cart Demo. You also don't have a lot of products, so would assume your current traffic isn't causing peaks on the server hardware, the current users in the bottom-right of your admin panel shows, I think, the last 5 minutes of activity. The site I am currently optimising is fast on all page loads and slightly quicker than your 'add to cart' even with options, but not by a great deal, although the site is on a fairly high spec dedicated server.


The add to cart is a bog problem but also the pages and categories are slow.

 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 28 January 2013 - 08:18 PM #45

The add to cart is a bog problem but also the pages and categories are slow.

I don't have any problems navigating through your store, each page, from the homepage, through categories, products and cart, all load just fine for me. I wouldn't have any complaints about your sites speed from my end. Turn on the template debugger, and browse through your store, you can get an idea of how long your server is taking to parse each template file. Try it at various times of the day, as these times will differ depending on traffic. Obviously since you have a VPS, you're still on a shared server, but given a "guaranteed" amount of dedicated hardware for your account. This won't help if other sites on the server (not just your account) experience high loads in traffic or use intensive scripts, but I haven't experienced many issues with page load times being excessive on a VPS, never on a dedicated server.

Unless you have particular requirements for doing so, in Settings>General, keep "Keep HTTPS connection once a secure page is visited" unchecked. As soon as a customer clicks add to cart and views the cart, all your pages are then served as HTTPS which is considerably slower. There shouldn't be any need for this to be enabled, as HTTPS will still be served in the cart and checkout as intended.
Hire StellarBytes for CS-Cart Design & Development Services

 

Posted 28 January 2013 - 10:25 PM #46

I don't have any problems navigating through your store, each page, from the homepage, through categories, products and cart, all load just fine for me. I wouldn't have any complaints about your sites speed from my end. Turn on the template debugger, and browse through your store, you can get an idea of how long your server is taking to parse each template file. Try it at various times of the day, as these times will differ depending on traffic. Obviously since you have a VPS, you're still on a shared server, but given a "guaranteed" amount of dedicated hardware for your account. This won't help if other sites on the server (not just your account) experience high loads in traffic or use intensive scripts, but I haven't experienced many issues with page load times being excessive on a VPS, never on a dedicated server. Unless you have particular requirements for doing so, in Settings>General, keep "Keep HTTPS connection once a secure page is visited" unchecked. As soon as a customer clicks add to cart and views the cart, all your pages are then served as HTTPS which is considerably slower. There shouldn't be any need for this to be enabled, as HTTPS will still be served in the cart and checkout as intended.

I unchecked "Keep HTTPS connection once a secure page is visited" the same customers are still have the 15 seconds to add to cart and very slow page loads.

 
  • Struck
  • Teetering on Genious
  • Members
  • Join Date: 07-Mar 09
  • 2502 posts

Posted 28 January 2013 - 11:38 PM #47

As soon as a customer clicks add to cart and views the cart, all your pages are then served as HTTPS which is considerably slower. There shouldn't be any need for this to be enabled, as HTTPS will still be served in the cart and checkout as intended.


Sorry Stellar, I would have to disagree with you on this one...

The real slow down in CS-Cart (as well as many other shopping carts) occurs when toggling between secure and non-secure pages due to the continual page refreshing. The difference in general page speed running http vs. https is negligable when running on any decent server setup. This page refresh slow down is quite easy to experience in CS-Cart, just toggle back & forth from a secured to non-secured page, then tick the "remain in https once a secure page has been visited" setting and observe the difference, it will give your site visitors a much more pleasant experience while navigating/shopping on your site!

Even while viewing Compact discounts site, the subsequent site loads after the initial visit are quite fast, certainly not what I would consider as a slow site, however, every visit to and from a secured page is close to a 3 second time of "White Space" simply to switch from http to https, which is not a pleasant experience. ;-)
Cooking with Gas on Version 4.1.2 (But proceeding with caution....)

 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 29 January 2013 - 12:11 AM #48

Sorry Stellar, I would have to disagree with you on this one...

The real slow down in CS-Cart (as well as many other shopping carts) occurs when toggling between secure and non-secure pages due to the continual page refreshing. The difference in general page speed running http vs. https is negligable when running on any decent server setup. This page refresh slow down is quite easy to experience in CS-Cart, just toggle back & forth from a secured to non-secured page, then tick the "remain in https once a secure page has been visited" setting and observe the difference, it will give your site visitors a much more pleasant experience while navigating/shopping on your site!

Even while viewing Compact discounts site, the subsequent site loads after the initial visit are quite fast, certainly not what I would consider as a slow site, however, every visit to and from a secured page is close to a 3 second time of "White Space" simply to switch from http to https, which is not a pleasant experience. ;-)

When changing from http to https, the connection to and from the client and server is sent and received through a different port. In essence, changing from non-http to https is in effect like viewing the website for the first time; the initial page load.

Data sent encrypted is always going to be slower.

I advise you to set up Analytics and set up funnels. How many customers who purchase 2 or more items, viewed the cart, then went back to find the other product(s)? In every store I manage, where the 'add to cart' doesn't automatically bounce to the cart and a simple 'added to cart' message is displayed, customers have a tendency to go find the other product(s), add them to the cart, and then proceed to the cart then checkout. Having the option to continually serve HTTPS is not beneficial in terms of how quick your site is presented to the client user. Forcing all content to be server under https is going to cause more strain on the server during peak times, one way or another, initial page load times will stink.
Hire StellarBytes for CS-Cart Design & Development Services

 
  • Struck
  • Teetering on Genious
  • Members
  • Join Date: 07-Mar 09
  • 2502 posts

Posted 29 January 2013 - 12:20 AM #49

In essence, changing from non-http to https is in effect like viewing the website for the first time


Exactly my point!

And it really is all about user experience.
Cooking with Gas on Version 4.1.2 (But proceeding with caution....)

 

Posted 29 January 2013 - 01:17 AM #50

When changing from http to https, the connection to and from the client and server is sent and received through a different port. In essence, changing from non-http to https is in effect like viewing the website for the first time; the initial page load.

Data sent encrypted is always going to be slower.

I advise you to set up Analytics and set up funnels. How many customers who purchase 2 or more items, viewed the cart, then went back to find the other product(s)? In every store I manage, where the 'add to cart' doesn't automatically bounce to the cart and a simple 'added to cart' message is displayed, customers have a tendency to go find the other product(s), add them to the cart, and then proceed to the cart then checkout. Having the option to continually serve HTTPS is not beneficial in terms of how quick your site is presented to the client user. Forcing all content to be server under https is going to cause more strain on the server during peak times, one way or another, initial page load times will stink.

What is Analytics and what is funnels?

 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 29 January 2013 - 02:19 AM #51

What is Analytics and what is funnels?

Google Analytics. Funnels are something you can set up within Analytics which allows you to have a better understanding of how shoppers interact with your site. This then allows you to tweak your site and compare conversion rates to find what works best. It's amazing how much a site redesign can change a sites conversion rates over night and even more so once you analyse sales via funnels.
Hire StellarBytes for CS-Cart Design & Development Services

 
  • Magpie Don
  • Senior Member
  • Members
  • Join Date: 01-Apr 09
  • 814 posts

Posted 29 January 2013 - 05:59 PM #52

@ miracles

CS-Cart uses a variable include for these scripts so it is not as simple as adding 'defer async' to the include script as these are stripped out, which I am working on a solution to. Alternatively, depending on your skin which may be different, you could move the placement of the following:

/skins/yourskin/customer/index.tpl (seems to be the most common location for this piece of code, although your skin may vary)

{include file="common_templates/scripts.tpl"}
Move this code from within the to below the closing tag. Refresh your cache. I have done this on one site and noticed no adverse effects in terms of functionality, but page load times increased by approximately 4 seconds. Of course, using 'defer' on specific scripts would be far better.


Stellar,
Could you clarify the placement on this tweak?
"Move this code from within the to below the closing tag." Are you saying move it from within the HEAD tag, to below the closing HEAD tag, or to somewhere else?

CS-Cart Ultimate ver 4.3.5


 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 29 January 2013 - 06:52 PM #53

Stellar,
Could you clarify the placement on this tweak?
"Move this code from within the to below the closing tag." Are you saying move it from within the HEAD tag, to below the closing HEAD tag, or to somewhere else?

Just above the closing </body> tag is where I put it. Never had any problems at all. I'll go back and edit my previous post as I mistakenly never put the HTML in code tags. You'll want to add that line below the closing
</body>
tag.
Hire StellarBytes for CS-Cart Design & Development Services

 
  • P-Pharma
  • Junior Member
  • Members
  • Join Date: 30-Jun 10
  • 1138 posts

Posted 29 January 2013 - 08:00 PM #54

Many thanks for these tweaks. Stellar.

Does CS-Cart 3 Ultimate allow you to host images and javascript on a cookieless domain?

 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 29 January 2013 - 09:37 PM #55

Many thanks for these tweaks. Stellar.

Does CS-Cart 3 Ultimate allow you to host images and javascript on a cookieless domain?

I asked the question, but cookies are required, unfortunately.
Hire StellarBytes for CS-Cart Design & Development Services

 
  • Magpie Don
  • Senior Member
  • Members
  • Join Date: 01-Apr 09
  • 814 posts

Posted 30 January 2013 - 03:07 PM #56

Just above the closing </body> tag is where I put it. Never had any problems at all. I'll go back and edit my previous post as I mistakenly never put the HTML in code tags. You'll want to add that line below the closing

</body>
tag.

Thank you for the clarification.
Moving the include for the scripts stopped the carousel banners on my home page from appearing - so I had to move it back to the top of the index.tpl.

CS-Cart Ultimate ver 4.3.5


 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 30 January 2013 - 06:41 PM #57

Time for an update. I applied these settings to a new site, taking it from a PageSpeed score of B (82%) and ySlow of C (74%) to A (90%) and B (89%).

If you are using SmartOptimizer, I suggest you use this modified version which takes advantage of cache validation and fixes a major bug in the existing SmartOptimizer 1.8. Your customers are unlikely to see the error, but they will feel the ill effects. Compressed content is being forced to be compressed again in the default SmartOptimizer install.

Unzip both files. Upload the extracted .htaccess file from '.htaccess.zip' to the root of your store. Back up your existing .htaccess file before doing so, just in case.

Upload the contents of SmartOptimizer.zip after extracting to the /smartoptimizer/ folder at the root of your store. These files should overwrite the existing SmartOptimizer [v1.8] files.

Also, if your server has the "MySQL Improved" module, you can change the 'db_type' to 'mysqli' in config.local.php for some further improvements.

Attached Files


Hire StellarBytes for CS-Cart Design & Development Services

 
  • P-Pharma
  • Junior Member
  • Members
  • Join Date: 30-Jun 10
  • 1138 posts

Posted 30 January 2013 - 07:12 PM #58

Does the first post have the complete optimization instructions?

 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 30 January 2013 - 07:21 PM #59

To install SmartOptimizer:

Installation Instructions
------------------------
1. Upload smartoptimizer folder to your website.
2. "smartoptimizer/cache" folder should be writable (in most cases 777 permission is needed).
3. Upload .htaccess file on the folder that smartoptimizer folder is placed, if there is no another htaccess file currently.
   Otherwise, Copy content of SmartOptimizer htaccess file and paste it inside your current htaccess at the beginning of the file.
4. It's ready. Enjoy it.

Note, if you use the .htaccess in the first or 57th post, you do not need to carry out step 3 as I have already added the Smart Optimizer related code to the .htaccess file.
Hire StellarBytes for CS-Cart Design & Development Services

 

Posted 31 January 2013 - 02:25 AM #60

Time for an update. I applied these settings to a new site, taking it from a PageSpeed score of B (82%) and ySlow of C (74%) to A (90%) and B (89%).

If you are using SmartOptimizer, I suggest you use this modified version which takes advantage of cache validation and fixes a major bug in the existing SmartOptimizer 1.8. Your customers are unlikely to see the error, but they will feel the ill effects. Compressed content is being forced to be compressed again in the default SmartOptimizer install.

Unzip both files. Upload the extracted .htaccess file from '.htaccess.zip' to the root of your store. Back up your existing .htaccess file before doing so, just in case.

Upload the contents of SmartOptimizer.zip after extracting to the /smartoptimizer/ folder at the root of your store. These files should overwrite the existing SmartOptimizer [v1.8] files.

These changes are awesome. I'm now getting a Page Speed: A 92% & a Yslow grade: B 88%. Before I did your first tweaks I was getting an F & D rating. Again, I can't praise enough the work you're doing to help people using CS-Cart 3.