Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Speeding Up 2.3.4


imusorka

Recommended Posts

Hello,

1. Look up "A Store Speed Optimization In Progress" in the forums. Follow that thread thoroughly.  Some things still apply or will lead you in the right direction. 

2. Search for "speeding", "optimization" and "minify". You'll find a lot of info. 

3. Use indices in your database where possible. 

4. Search extensively first before you ask. 

5. A lot of solutions dealing with .css and .js can be found in Google. There are some here too.  

Link to comment
Share on other sites

I joined the forum back in 2005 so I do know about the search function. The best advice on general speed optimization is given by @ecommunlimited in this thread. Using a CDN is a no-brainer, but since we already have a dedicated server, we can host a cookie-less domain supported by an SSL certificate as our store goes through https entirely. For this reason, I am (once again) wondering whether this approach is still considered to be the best. It was quoted in an old forum thread after all.

Link to comment
Share on other sites

A separate domain and website just to serve CSS and JS seems like overkill. Why would a "cookie-less domain" be any improvement? You need a cookie set on your site for the cart session, etc., and that's not going to be done on CSS and JS requests, just the first page. I don't know why this advice was ever given -- it makes no sense to me. Besides, a domain doesn't do cookies -- your web page code served from that site (domain) makes use of cookies. Best bet is to ignore that advice. There are lots of things you can do to speed up a page without losing the session tracking of a cookie.

By the way, in case you weren't aware, the late @ecommunlimited won't be able to help you on this.

Link to comment
Share on other sites

You are absolutely right @MrPhil. Having done some A/B testing today, I can see that a cookie-free domain would play a negligible role in the overall speed improvement. Uncompressed images and render-blocking JS/CSS are the main culprits. But it's surprising that even a vanilla 2.3.4 BS doesn't load in less than 4 seconds according to the Google mobile test for exactly the same reasons. Is this being implemented in 2.4 instead? If it isn't it should. Half of our traffic is mobile already, which is probably about the same for everyone. Its share will only grow from here.

Link to comment
Share on other sites

50 minutes ago, imusorka said:

You are absolutely right @MrPhil. Having done some A/B testing today, I can see that a cookie-free domain would play a negligible role in the overall speed improvement. Uncompressed images and render-blocking JS/CSS are the main culprits. But it's surprising that even a vanilla 2.3.4 BS doesn't load in less than 4 seconds according to the Google mobile test for exactly the same reasons. Is this being implemented in 2.4 instead? If it isn't it should. Half of our traffic is mobile already, which is probably about the same for everyone. Its share will only grow from here.

The code in EDGE is pretty efficient. I have over 200k products and my site loads in less than 2 secondso on a vps server. I did this by indexing both columns in products_to_categories table in phpmyadmin.

Link to comment
Share on other sites

47 minutes ago, discxpress said:

I did this by indexing both columns in products_to_categories table in phpmyadmin.

Could you please clarify what is meant by indexing? To be honest, we have never done anything to our database since migration to 2.3.4 a few years ago. Perhaps, this has something to do with the slow speed. By the way, do you use a custom template and a bunch of mods too?

Link to comment
Share on other sites

Update: just used the database optimizer add-on by @Jack_mcs and freed up ~250MB in the process (thank you Jack!). Regretfully, that didn't help improving the overall page speed. Does the add-on cover the indexing you are referring to?

Link to comment
Share on other sites

1 hour ago, imusorka said:

Update: just used the database optimizer add-on by @Jack_mcs and freed up ~250MB in the process (thank you Jack!). Regretfully, that didn't help improving the overall page speed. Does the add-on cover the indexing you are referring to?

I'm not familiar with that add-on. I did it manually and saw a great increase. Give it a try! Best of luck. 

Link to comment
Share on other sites

https://www.oscommerce.com/forums/topic/119077-a-store-speed-optimization-in-progress/

i added db indices, tax classes, image resizing, configuration caching, seo with cache, homepage cache, removed unused function calls etc

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

@imusorka you mentioned your store is heavily modded. Perhaps some code in one or more of the add-ons aren't written properly. Also, in the EDGE version some things are added in the core code and rendered certain add-ons outdated. 

I've been dealing with OSCommerce a while and have found the older add-ons can cause conflict with the new, cleaner code.

If you decide to try out the EDGE version, I would suggest installing newest versions of the add-ons you currently have. OR if you decide to stay with your current GOLD version, try disabling add-ons one by one to see which is slowing down your site.

On another note, I'm using the out of the box template adjusted to my liking. 

@bruyndoncx provided a link to a thread that has code to help diagnose slow queries. Check it out. Best of luck.

Link to comment
Share on other sites

I suggest we make a shortlist of all the key optimization tips linked to an actual add-on or explanation. This will also save other busy store owners from reading 37 pages of the thread. Everybody, please do join in. It will certainly be appreciated by future visitors to this thread.

Link to comment
Share on other sites

On 31/07/2017 at 1:38 AM, frankl said:

@imusorka

Instructions for what @discxpress suggested: In phpMyAdmin (if you have it) choose the products_to_categories table, then select structure. Tick both columns and then click Index.

 

index.png

Could this have any adverse effects if a product was in multiple categories, or if a product was moved to a different category after indexing?

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

The index causes the table to treat that field differently. It doesn't track what is in the field. So, no, indexing won't cause any problems. Although, it is possible to over-index and that can cause a slow-down.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

On my Gtmetrix Yslow scores the biggest impact is "Add Expires Headers" with a long expiration date for the following:

  • Google analytics
  • Facebook (inc microdata)
  • Twitter

I have never managed to find a way to do this - has anyone managed to find a way to achieve this?

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

On 7/30/2017 at 0:10 AM, imusorka said:

Is this advice still considered good practice today? Even a clean Edge demo scores poorly on Google's PageSpeed test. We are on a heavily-modded Gold with a custom template, which means 19 external scripts and 8 stylesheets, all of which hurts our metrics.

1.  That demo is *not* edge.  It might be close to it, but certainly there are loads of things in edge not in that demo and things in that demo that are not in edge.

2.  The host that this demo is on is a crappy cheapo bucket host.  Really really dead cheap, that no business owner in their right mind would consider using.

3.  Just tested it anyway, and get the attached, which in my opinion is ... decent when taking into account #1 and #2 above.

pagespeed.jpg

Link to comment
Share on other sites

17 minutes ago, Mort-lemur said:

On my Gtmetrix Yslow scores the biggest impact is "Add Expires Headers" with a long expiration date for the following:

  • Google analytics
  • Facebook (inc microdata)
  • Twitter

I have never managed to find a way to do this - has anyone managed to find a way to achieve this?

So far as I recall ... when I looked into speeding things up ... one cannot add expires headers to externally loaded scripts.

Link to comment
Share on other sites

@burt Thank you

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

  • 3 months later...

Hi,

Just a question, about the HT access part. I have the following :

Htaccess in root with redirect to a directory where the shop is. 

in the catalog directory also a htaccess file. 

In which of the files is it best to put the optimizations in.

Greetings, Anne

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...