Jump to content

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

Speed Up Your CS-Cart eCommerce Website - Step 1 Rate Topic   * * * * * 1 votes

 
  • Lee Li Pop
  • Senior Member
  • Members
  • Join Date: 07-Mar 08
  • 941 posts

Posted 16 January 2011 - 07:04 PM #41

Hello Flow,

I need to reduce my CSS file which is very fat (96 Kb after bundling all the CSS files into one and compaction).

I think I can bring down the size to about 20 Kb. In this way, the pages will be simpler, smaller and lighter.

More, I don't talk to you how to reduce pictures size, how to group them, how to manage CSS to reduce size, how to do... Thousands of small things to get a high level in Yslow and Page Speed.

Nevertheless, I don't want talk of these steps, because you could say of me: You're absolutely crazy!

But no, I'm not the Speedmeister you think I am.

The only Meister is Casinomeister. The only casino I played was the late Global Player Casino, closed now for years. This casino was the only one where you could make a Card Counting, because their proprietary software of blackjack renewed the shoe every 15 to 25 hands.

Yes gambling is illegal in China. Yes gambling is a problem for Chinese people. Try to curb her sins is not easy every time... Posted Image

So I am a member of this forum which is trying to share what seems useful to everyone... Free of charge.

Not like in a casino where you can just lose your shirt in a minute... Posted Image


Lee Li Pop
.
If All Else Fails, Read The Instruction Manual! Knowledge Base 2.x + CS-Cart Instruction Manual

Hosted at Pair.com since 2000. Zero hacking attempts during first 11 years... And counting!

 
  • clips
  • Aged Resident Loon
  • Members
  • Join Date: 14-Jan 07
  • 1650 posts

Posted 25 February 2011 - 02:47 AM #42

I just upgraded one of our sites from 2.1.2 to 2.1.3 and we went from "C's" to
Page Speed Grade:
(79%)

YSlow Grade:
(86%)

Has anyone else seen any speed increase from the upgrade? I know CS said that it would be less database contacts.
Regards,
Jim

 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2391 posts

Posted 25 February 2011 - 12:49 PM #43

It's a bit faster but we went up only 1 or 2 points (to a good mid 80's), nothing like this!

When life hands you lemons, bring on the Tequila baby!


 
  • snowunder
  • Junior Member
  • Members
  • Join Date: 08-May 10
  • 4 posts

Posted 18 March 2011 - 08:10 PM #44

Hi Lee Li

I managed to get the gzip compression, however, the new results on GTMetrix are the same as before, any idea what went wrong ? Also When you say if we clean up and correct code, we can easily get 90 %, could you let me know how to do that please, thank you very much in advance. You'v been great. ,



Hello E.Qi.Librium,

Your GTMetrix results are for your website in your signature:

YSlow Grade: (79%) C

Google Page Speed Grade: (77%) C

Better than the official CS-Cart demo results:

http://demo.cs-cart.com/

YSlow Grade: (57%) E

Page Speed Grade: (70%) C

If you follow me trough all steps, you can easily get +85% B.

If you clean up and correct your code, you can easily get +90% A.

Go from E-C to B-B and (why not) A-A and your website will be from x2 to x4 times faster.

Easy way! :cool:

Remember:

A faster website, brings more customers and you get more money!

Everything is FREE, everything is made by yourself!

A last word, everything is as easy as this first step...

So, stay tuned on the Lee Li Pop's optimization station!


Lee Li Pop



 
  • snowunder
  • Junior Member
  • Members
  • Join Date: 08-May 10
  • 4 posts

Posted 19 March 2011 - 04:42 PM #45

Hello Lee Li

Hello All,

First of all, let's go to check your website's results on GTMetrix:

http://gtmetrix.com/

On WebPageTest:

http://www.webpagetest.org/

And on Zoompf:

http://zoompf.com/

*****

Nowadays, Google takes into account the speed of your website to determine your ranking in SERP.

http://www.mattcutts...log/site-speed/

http://www.mattcutts...fresh-indexing/

The fastest and easy way to speed up your website, is to turn on the gzip compression.

What is gzip compression?

The server compresses your pages by zipping them before sending to your visitors. Thus, the weight of your pages is lighter and therefore faster to load. Your site becomes faster, becoming compatible with the new Google rules.

How do I know if I can get gzip compression?

Follow this path:

Backoffice > Administration > Database > (click on link) "PHP Information"

On the new page that appears, search for "mod_deflate"

If "mod_deflate" is in "Loaded Modules", then you officially have the ability to turn on gzip compression.

If "mod_deflate" is NOT there, don't worry, read more...

How to officially have the gzip compression?

You have "mod_deflate" in "Loaded Modules".

Edit your ".htaccess" file on your root and add this code:

<IfModule mod_deflate.c>
<FilesMatch "\.(js|css|php|html)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>

Please, note this:

If you have Smartoptimizer, add this code:

<IfModule mod_deflate.c>
<FilesMatch "\.(php|html)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>

Nota Bene:

Smartopitimizer is faster on JS and CSS than "mod_deflate" because it manages JS and CSS in static way. So, don't put these files on "mod_deflate" if you have Smartoptimizer!

How to unofficially have the gzip compression?

You have NOT "mod_deflate" in "Loaded Modules".

Edit your "index.php" file on your root and add to the first line, right after the CS-Cart copyright comments:

# Gzip here, because my web hosting company does NOT turn on gzip "mod_deflate".
ob_start("ob_gzhandler");

or:

# Gzip here, because my web hosting company does NOT turn on gzip "mod_deflate".
if(!ob_start("ob_gzhandler")) ob_start();

Test your page for gzip compression:

http://www.whatsmyip...tp_compression/

If you get a red cross Posted Image, NOT a green check Posted Image, thus, gzip compression is locked. Ask you support to know why.

Check your new results on GTMetrix:

http://gtmetrix.com/

On WebPageTest:

http://www.webpagetest.org/

And on Zoompf:

http://zoompf.com/

Taste the difference :cool:



Lee Li Pop


I managed to get gzip compression, i also get green check on http://www.whatsmyip...tp_compression/
. However, the new results are the same. What might i have missed ? Thank you very much for your time.

 
  • clips
  • Aged Resident Loon
  • Members
  • Join Date: 14-Jan 07
  • 1650 posts

Posted 30 March 2011 - 02:59 AM #46

I just ran the zoompf and one of the responses said...

This external style sheet contains a single @import directive to include another style sheet. This causes the browser to make an additional HTTP requests to retrieve the additional sheet. Since this CSS file contains only a single @import you have should include the contents of imported style sheet in the base style sheet. This will reduce the number of HTTP requests required to load the web page improving page load times and decrease bandwidth consumption.

So does this mean if we have the site using "my changes" that allows the "hooks" to be used that this will negatively affect the site because it has to look at another style sheet?

I know the hooks are done to keep the upgrade easier and love it because of that. I am just curious on this.
Regards,
Jim

 
  • Lee Li Pop
  • Senior Member
  • Members
  • Join Date: 07-Mar 08
  • 941 posts

Posted 30 March 2011 - 03:25 AM #47

Hello Clips,

I just ran the zoompf and one of the responses said...

So does this mean if we have the site using "my changes" that allows the "hooks" to be used that this will negatively affect the site because it has to look at another style sheet?

I know the hooks are done to keep the upgrade easier and love it because of that. I am just curious on this.


1 - Avoid CSS @import:

http://code.google.c...#AvoidCssImport

2 - Combine external CSS (into one):

http://code.google.c...bineExternalCSS



Lee Li Pop
.
If All Else Fails, Read The Instruction Manual! Knowledge Base 2.x + CS-Cart Instruction Manual

Hosted at Pair.com since 2000. Zero hacking attempts during first 11 years... And counting!

 
  • clips
  • Aged Resident Loon
  • Members
  • Join Date: 14-Jan 07
  • 1650 posts

Posted 30 March 2011 - 03:31 AM #48

So is it the "hooks" or something that was already coded in CS?
Regards,
Jim

 
  • colortone
  • Senior Member
  • Members
  • Join Date: 31-Jan 10
  • 368 posts

Posted 30 March 2011 - 03:32 AM #49

If you check on pingdom, you'll notice both files (main styles.css and my changes file) load simultaneously; styles.base.css follows after.

I tried the merged option, but the base.css will just add the load time to the styles.css file.

Maybe will be an improvement in speed if the styles are called when needed. For example, some part of the styles.css work for the checkout or product listing, and are not requiered on the front page.

Will be nice is the styles.css is splitted and called by active blocks or the styles.base.css is called rather than imported, so it loads simultaneously.

 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2391 posts

Posted 30 March 2011 - 08:41 AM #50

So is it the "hooks" or something that was already coded in CS?


To answer your question. It's not the hooks :)
It's a CSS file that calls another CSS file, nothing to worry about.

When life hands you lemons, bring on the Tequila baby!


 
  • clips
  • Aged Resident Loon
  • Members
  • Join Date: 14-Jan 07
  • 1650 posts

Posted 30 March 2011 - 04:07 PM #51

Thanks for the clarification flow!
Regards,
Jim

 
  • jegesmaci
  • Senior Member
  • Members
  • Join Date: 05-Oct 09
  • 403 posts

Posted 05 April 2011 - 12:52 PM #52

Lee Li Pop,

I don't have gzip, but I do have smart optimizer. Here is the code so far:

<IfModule mod_expires.c>
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$">
ExpiresActive On
ExpiresDefault "access plus 10 years"
</FilesMatch>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
	
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*\.(js|css))$ smartoptimizer/?$1
	
<IfModule mod_expires.c>
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(js|css|html?|xml|txt))$ smartoptimizer/?$1
</IfModule>

<IfModule !mod_expires.c>
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt))$ smartoptimizer/?$1
</IfModule>
</IfModule>
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$">
FileETag none
</FilesMatch>

Should I add what you suggest in your first post? My site is really slow and I would like to speed it up. I have over 20,000 products so every little bit counts.

Thanks,

Adam

 
  • S-Combs
  • Senior Member
  • Members
  • Join Date: 09-Nov 06
  • 692 posts

Posted 05 April 2011 - 05:06 PM #53

@ Adam
mod_deflate is enabled on your server as a static Apache module and it fully supports gzip. The instructions to determine that are incorrect in the first post.

I just looked through the server logs to see if I could find any reason why your store isn't performing well and noticed many errors. These are mostly related to mailchimp but there are also a few others like below

PHP Warning: Division by zero in /home/account/public_html/addons/mailchimp/class.mailchimp.php on line 462

PHP Fatal error: Call to a member function returnResponse() on a non-object in /home/account/public_html/addons/twigmo/func.php on line 815

PHP Fatal error: Call to a member function read() on a non-object in /home/account/public_html/core/fn.fs.php on line 448

PHP Warning: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists in /home/account/public_html/core/fn.fs.php on line 114

PHP Warning: gethostbyaddr() [<a href='function.gethostbyaddr'>function.gethostbyaddr</a>]: Address is not a valid IPv4 or IPv6 address in /home/account/public_html/addons/access_restrictions/func.php on line 208

Not sure if any of those are impacting site performance but you should look into them
Secure Cart Hosting
[CS-Cart Optimized Solutions and Server Management]

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12028 posts

Posted 05 April 2011 - 06:00 PM #54

Please send me a list of any mailchimp errors you are seeing in your logs and I will fix and generate a new version immediately.

Edit: Ummm... Line 462 of the current version of mailchimp is a foreach() statement. There can be no divide by zero.
Please send me the version number by executing this URL:
<your_domain_admin.php>?dispatch=mailchimp.version

You should be at version 2.1.12 which is most current.

Also looks like he's running the beta stuff of the iPhone app here too...

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • S-Combs
  • Senior Member
  • Members
  • Join Date: 09-Nov 06
  • 692 posts

Posted 05 April 2011 - 06:21 PM #55

$addon_cur_ver = '2.1.12';

It's this same error each time (4,328 times in 2 days)

PHP Warning: Division by zero in /home/accountname/public_html/addons/mailchimp/class.mailchimp.php on line 462


Secure Cart Hosting
[CS-Cart Optimized Solutions and Server Management]

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12028 posts

Posted 05 April 2011 - 06:34 PM #56

Please email me his class.mailchimp.php file. Obviously something doesn't match up here.
line 462 in my source base is:
foreach($subscriber_ar as $email => $sub_dat) {
In fact, I don't see anywhere I'm doing any division in the class at all. It isn't exactly a mathmatical addon....

There is a 'mod' operator (%) used o determine the "chunk" of data to send. However, it is a define of
define('MC_USER_BATCH_CHUNK_SIZE', 500);
so it should not be zero. It is then used in
if( ($idx++ % MC_USER_BATCH_CHUNK_SIZE) == 0 ) {

Note that this whole function is only used when doing an export of existing customers/users. So it certainly shouldn't be repeating.

Also send me:
var/logs/mailchimp.log

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • S-Combs
  • Senior Member
  • Members
  • Join Date: 09-Nov 06
  • 692 posts

Posted 05 April 2011 - 07:10 PM #57

I just sent you the file and errors Tony.
Secure Cart Hosting
[CS-Cart Optimized Solutions and Server Management]

 
  • jegesmaci
  • Senior Member
  • Members
  • Join Date: 05-Oct 09
  • 403 posts

Posted 06 April 2011 - 01:00 PM #58

tbirnseth and S-Combs,

Thank you so much. That is first class service! I will recommend your products and services anytime.

I would do anything to speed up my site. I will email the error logs to CS-Cart and see what they can offer on those not related to the addons purchased from other companies.

Is there any code I need to add to take advantage of gzip?

Thanks,

Adam

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12028 posts

Posted 06 April 2011 - 08:52 PM #59

There's something very strange going on on your system.
Please contact me at tonybXX@ez-msXX.com (remove X's). I will need to get onto your system to see what's happening with mailchimp integration. Nothing makes sense from the info I've seen so far.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • jegesmaci
  • Senior Member
  • Members
  • Join Date: 05-Oct 09
  • 403 posts

Posted 07 April 2011 - 02:33 AM #60

Thanks tbirnseth. I sent the information to your email address.