Post by AndyGaskell » Sun Nov 13, 2011 5:19 am

I would definitely second...
chris17453 wrote:kill children counts. That gave me a ton of speed
...I have a shop on OC 1.5.1, it has 8000 products in 850 categories. Performance numbers on the standard code, out of the box on Ubuntu 11.10, 1.8GHz laptop with 2GB RAM...
- Pages with the top menu (home page) the load times were 30 seconds.
- Pages with the top menu and the categories module (product pages) the load times were 50 seconds.
...and it'd max out the CPU for that whole period.

But a few simple tweaks can fix this.

In the file /catalog/controller/common/header.php I commented out line #198, which reads...

Code: Select all

$product_total = $this->model_catalog_product->getTotalProducts($data);
In the file /catalog/controller/module/category.php I commented out line #44, which reads...

Code: Select all

$product_total = $this->model_catalog_product->getTotalProducts($data);
...and line #58, which also reads...

Code: Select all

$product_total = $this->model_catalog_product->getTotalProducts($data);
You'll also need to remove bits that refer to these variables, which in all 3 cases are a few lines below, so something like a change from...

Code: Select all

'name'  => $child['name'] . ' (' . $product_total . ')',
...to...

Code: Select all

'name'  => $child['name'] . ' ',
So, with these changes, the CPU doesn't max out at all, peaking at 70% at most, and page loads are down to sub 1 second. So, just to reiterate that, these tweaks reduced load time by between 90 - 95%, which just sounds crazy.

Perhaps we could have a config setting called "show product counts", so we could switch off product counts easily .

I'm a web developer at http://www.ssofb.co.uk in Aberdeen, Scotland.
Got a random blog at http://www.andygaskell.blogspot.com/.


User avatar
New member

Posts

Joined
Thu Dec 10, 2009 3:59 am
Location - Aberdeen UK

Post by rph » Sun Nov 13, 2011 8:33 am

AndyGaskell wrote:Perhaps we could have a config setting called "show product counts", so we could switch off product counts easily .
Q added it to the SVN a while back.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by AndyGaskell » Sun Nov 13, 2011 5:51 pm

rph wrote:Q added it to the SVN a while back.
Thanks for the heads up rph, I see it, rev 686, be great when that's in the release. Nice work Q.

I'm a web developer at http://www.ssofb.co.uk in Aberdeen, Scotland.
Got a random blog at http://www.andygaskell.blogspot.com/.


User avatar
New member

Posts

Joined
Thu Dec 10, 2009 3:59 am
Location - Aberdeen UK

Post by netpox » Fri Dec 16, 2011 10:33 am

rph wrote:A little more complete/consistent code:

/catalog/controller/common/header.php
/catalog/controller/product/search.php

Replace

Code: Select all

$this->data['categories'] = $this->getCategories(0);
with

Code: Select all

		if ($this->cache->get('search.categories.' . $this->config->get('config_language_id') . '.' . (int)$this->config->get('config_store_id'))) {
			$this->data['categories'] = $this->cache->get('search.categories.' . $this->config->get('config_language_id') . '.' . (int)$this->config->get('config_store_id'));
		} else {
			$this->data['categories'] = $this->getCategories(0);
			
			$this->cache->set('search.categories.' . $this->config->get('config_language_id') . '.' . (int)$this->config->get('config_store_id'), $this->data['categories']);
		}
/admin/model/catalog/category.php
public function addCategory
public function editCategory
public function deleteCategory

Replace:

Code: Select all

$this->cache->delete('category');
with

Code: Select all

$this->cache->delete('category');
$this->cache->delete('search.categories');
Thanks to Q for mentioning the missed bit.

I did exactly what you said any my site went from 6 sec load time to 1-2 sec. I have 20 main categories, 120 sub-categories and then each sub-category has 15 sub-sub-categories. 5000+ products right now and still adding. Thanks Ryan!

Newbie

Posts

Joined
Fri Jul 23, 2010 11:54 pm

Post by netpox » Fri Dec 16, 2011 12:03 pm

My admin panel is still super slow when editing category. When I click on Save it takes a good 8-10 seconds to save. Any suggestions?

Newbie

Posts

Joined
Fri Jul 23, 2010 11:54 pm

Post by Daniel » Mon Dec 19, 2011 5:49 pm

try going to a dedicated host and add lots of ram.

opencart is one of the quickest stores out there but there are limits.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by rph » Tue Dec 20, 2011 8:47 am

netpox wrote:My admin panel is still super slow when editing category. When I click on Save it takes a good 8-10 seconds to save. Any suggestions?
That's because the high number of cache files that need to be deleted on a category change is slowing you down.

If your host is running Linux try using Better Cache Clear. If that doesn't work I have an experimental cache update VQMod script (which I never got around to fully testing).

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by andreamarts24 » Thu Dec 22, 2011 8:57 am

I am new here in OpenCart and I was stumbled across here via Google Search. I am planning to have an Opencart shop effective next year and I need some suggestions and recommendations from you guys! Any such are very much appreciated! Thanks!

[/b]


Newbie

Posts

Joined
Thu Dec 22, 2011 7:56 am

Post by oahida » Sat Dec 24, 2011 12:54 pm

shop is big or small that does n't matter.service is the main,in this regard i can say in Australia penta is the best,I bought
this http://penta.com.au/index.php?main_page ... Intel-Core

Newbie

Posts

Joined
Sat Dec 24, 2011 12:41 pm

Post by robinhood1995 » Sat Dec 31, 2011 8:05 am

Hi,

Just build a new site with over 25000 products 700 attributes and 65 categories and with the help of Andy's changes above my site when from a 30 sec page to a 1.2 sec page!

I have imported all my products with the help of MySQL and Excel :) :crazy:

http://www.guns4discount.com

Thanks
Steve
Last edited by robinhood1995 on Fri Apr 18, 2014 9:07 am, edited 1 time in total.

Newbie

Posts

Joined
Sat Dec 31, 2011 8:02 am

Post by vickiowa » Sat Jan 21, 2012 4:45 am

Building on what netpox said, has anyone tried commenting or editing out the $product_total reference from the /catalog/controller/product/category.php file as well?

Want to know whether this was beneficial to page load times of category and subcategory pages or not...

Thanks, Vick

Newbie

Posts

Joined
Tue Sep 27, 2011 6:16 am

Post by rph » Sun Jan 22, 2012 2:53 pm

It's extremely beneficial. If you look around there are some free and commercial VQMod scripts that do it.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by vickiowa » Tue Jan 24, 2012 8:39 pm

Currently on OC 1.5.1.3 and have some 6k products in 20 odd categories. Doing fine. Hosting needs to be good though.

As an aside, what are folks with much bigger stores doing to upload their product feeds (CSV)? Any recommendation on a working mod would be helpful.

Thanks, Vick

Newbie

Posts

Joined
Tue Sep 27, 2011 6:16 am

Post by hypemedia » Sun Oct 20, 2013 6:10 pm

We have 3 million products and over 800 categories. The store is up live at http://www.autohut.ro. We are working now on some heavy optimization but for now is working. The server is on a VPS with 6 Gb of RAM. and 3 x 3 Ghz cores.
We did some heavy modification to integrate the TECDOC database and lots of vqmods to modify less stuff on the core Opencart.

Active Member

Posts

Joined
Fri Aug 17, 2012 5:39 pm

Post by parcelscheaper » Tue Dec 24, 2013 11:26 pm

Your website (autohut.ro) is not using opencart, I have checked by using builtwith.com, I assume you are simply trying to get some free backlinks to your store.
I would love to see a English language website that actually has over 1 million products on it, the hunt is on!

Thanks


Posts

Joined
Tue Sep 10, 2013 7:36 am

Post by i2Paq » Thu Dec 26, 2013 1:45 am

parcelscheaper wrote:Your website (autohut.ro) is not using opencart, I have checked by using builtwith.com, I assume you are simply trying to get some free backlinks to your store.
I would love to see a English language website that actually has over 1 million products on it, the hunt is on!

Thanks
I have send him a PM.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by hypemedia » Wed Apr 02, 2014 10:37 pm

The client had some problems with the server and the DNS was sending traffic also to the old site that was on CodeIgniter now the site is online and working with all the products. We are still trying to optimize some requests. Sorry but is not english, it is romanian only. All the information from the old post remains valid with the exception that the memory is now at 12 Gb and we are using varnish as reverse proxy.

In case that you are not sure you can check it here: http://builtwith.com/autohut.ro

Active Member

Posts

Joined
Fri Aug 17, 2012 5:39 pm

Post by utomo » Thu Apr 03, 2014 8:46 am

I hope you can contribute some modification which make opencart faster.
By doing that it can reduce your modification / problems when updating to newer version

New member

Posts

Joined
Sat Nov 26, 2011 12:55 pm

Post by hcamelion » Fri Jun 06, 2014 10:48 am

I had this issue too. I created a vqmod to speed things up by caching the categories processing in two files:

http://forum.opencart.com/viewtopic.php ... 11#p500211

Henry Weismann
877.44.MY.WEB (877.446.9932)
We can help with your Opencart Site - Opencart Web Developer

Image


User avatar
New member

Posts

Joined
Mon Jul 27, 2009 3:14 am
Location - Albany, NY, USA

Post by spemux » Tue Feb 03, 2015 2:03 pm

I'm on shared hosting. Nearly 10K products and 180 Categories. Opencart runs like a dream.

New member

Posts

Joined
Thu May 10, 2012 8:22 pm
Location - Scandinavia
Who is online

Users browsing this forum: No registered users and 14 guests