Post by VHalek » Thu Jul 01, 2010 5:33 am

Hi, I've got about 300 categories and about 500 products in my Opencart store, but I think it's reason why my Opencart started to be very slow (also in admin panel).
Do you know about any cache fix or another solution how to make it faster?

Newbie

Posts

Joined
Mon May 31, 2010 6:10 am

Post by i2Paq » Thu Jul 01, 2010 3:07 pm

And on what kind of server/os is OC running?
Your sure that the problem is not caused by your server?

Check you provider setup/plan and ask you hoster as well.

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 VHalek » Thu Jul 01, 2010 5:08 pm

You're right that there is a possibility the problem is not on my side. But I wrote to my webhoster and they (as I expected) replied that their server is OK. But it's true that from this conversation with them I think it's little bit faster than before, but it's still not so fast as I want.

I also tried GZIP, but if I set there any other number than zero, the page "checkout/cart" doesn't work.

I've read on this forum that there are some solutions connected with cache fix, but I couldn't find any topic with more information...

Newbie

Posts

Joined
Mon May 31, 2010 6:10 am

Post by Qphoria » Thu Jul 01, 2010 7:15 pm

"doesn't work" doesn't help
The compression should work fine unless you have other errors.
If you have 300 categories, you may have an issue with the dropdown category search box. There is a cache example by rph to improve that. We will look into adding that to the core to improve things. Other than that, there is a lot caching already in place and OpenCart is one of the fastest carts around

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Daniel » Thu Jul 01, 2010 8:23 pm

post a link to your site please.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by benlhe » Tue May 31, 2011 11:39 am

Hi pro,
I am fresh & with very little knowledge on coding, I encounter the same problem, I contacted my hosting co. they said server is running fine, it probably due to my own internet connection. But I was able to browse other websites smoothly only my site was lag on loading..... any solution or catch / something I can do to speed it up ???

This is my site with about 350 products --> http://www.qqbox.my
Thanks

Ben Lai
WWW.QQBOX.MY (v.1.4.9.3)


User avatar
New member

Posts

Joined
Thu Feb 10, 2011 4:33 pm

Post by crazy_larva » Thu Jul 07, 2011 2:41 pm

The problem is 100% in category amount.
I have to develop an internet store that has about 2500 categories (12 categories, 124subcategories and 2400 subsubcategories). I imported them without products and my webserver crashed. I began to test performance, it worked fine with 100 categories, but with 500 of them apache consumed almost 100% of processor time and it took about 5 seconds to navigate from one to another. I'm going to tweak my apache\php config files today for better performance, but I'm afraid it will work very slow anyway with even a few visitors.
If anyone found a way to solve this problem - please post your solution

Newbie

Posts

Joined
Tue Jul 05, 2011 2:47 am

Post by kalexan » Tue Sep 13, 2011 11:02 pm

Hello.

I have being using version 1.4.9.X quite some time.

OpenCart is really well written in terms of code but there are majour performance issues when you need to use friendly URLs. That is because whenever a link to a product or category is displayed, even if the data is cached by the OC's intrernal caching engine, OC's code accesses the database to get the friendly URL.

For example, at a webstore that I use a flyout menu for categories' navigation (all category tree is loaded/displayed), without friendly URLs activated , 40-60 queries are needed. With friendly URLs activated, 800-1000 queries per page view!

Also consider that, when categories or lists of products are displayed, each generated link needs one query to get the friendly URL, so the more products displayed on a single page, the more queries needed to get friendly URLS.

Friendly URLs code must be rewritten for sure! I will try to mess things up a bit and will let you know...

Newbie

Posts

Joined
Fri Jul 24, 2009 5:56 pm

Post by netpox » Fri Dec 16, 2011 9:38 am

I have also experienced slow performance. I have about 50 main categories that have 120 sub-categories and then each one of those has 15 more categories inside. So there are 1800 subcategories inside the main categories. It's slow and crashes the site all the time. If i login to the admin panel and try to do something it crashes. Any solution? Is it because of the sub-categories or just categories?

Newbie

Posts

Joined
Fri Jul 23, 2010 11:54 pm

Post by JAY6390 » Fri Dec 16, 2011 9:41 am

Get vQmod and install this
http://www.opencart.com/index.php?route ... on_id=3703
Free mod and will speed up your categories at the expense of losing your category counts showing up. That is what causes the category speed issue

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by 3wcorner » Fri Dec 16, 2011 11:39 am

JAY6390 wrote:Get vQmod and install this
http://www.opencart.com/index.php?route ... on_id=3703
Free mod and will speed up your categories at the expense of losing your category counts showing up. That is what causes the category speed issue
I agree with JAY6390, it is the category product count!
i have resolved this issue, and i will publish a fix for this in the mean time, you can just comment out the getProductsTotal function call in order to avoid this for now...

Always a pleasure
Manny E.
3w.


New member

Posts

Joined
Sat Dec 18, 2010 12:27 am

Post by JAY6390 » Fri Dec 16, 2011 7:11 pm

You can, but that would mean you would get
Category Name ()
In your category menu items, which is a little undesirable, along with errors in your error log

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by 3wcorner » Fri Dec 16, 2011 10:39 pm

Original code....

Code: Select all

$results = $this->model_catalog_category->getCategories($category_id);
			
			foreach ($results as $result) {
				$data = array(
					'filter_category_id'  => $result['category_id'],
					'filter_sub_category' => true	
				);
							
				$product_total = $this->model_catalog_product->getTotalProducts($data);
				
				$this->data['categories'][] = array(
					'name'  => $result['name'] . ' (' . $product_total . ')',
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
				);
			}
			
			$this->data['products'] = arr...
New code would look something like this.
$results = $this->model_catalog_category->getCategories($category_id);

foreach ($results as $result) {
$data = array(
'filter_category_id' => $result['category_id'],
'filter_sub_category' => true
);
// here we will comment out the following line.
//$product_total = $this->model_catalog_product->getTotalProducts($data);

$this->data['categories'][] = array(
//'name' => $result['name'] . ' (' . $product_total . ')', // here is where you prevent the () from showing.
'name' => $result['name'], // here is where you prevent the () from showing.
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
);
}

$this->data['products'] = arr...
i did not think i will need to explain such simple code it is obviously visible, and simple to understand.

Always a pleasure
Manny E.
3w.


New member

Posts

Joined
Sat Dec 18, 2010 12:27 am

Post by vildamatilda » Wed Mar 07, 2012 6:18 am

benlhe wrote:Hi pro,
I am fresh & with very little knowledge on coding, I encounter the same problem, I contacted my hosting co. they said server is running fine, it probably due to my own internet connection. But I was able to browse other websites smoothly only my site was lag on loading..... any solution or catch / something I can do to speed it up ???

This is my site with about 350 products --> http://www.qqbox.my
Thanks
possible to get this to work on the version 1.4.9.3?? experience my page real slow and do not know why or what happened. Is there anyone who can look at my page and see if this module may be able to fix the problem.
www.webshop.barnbutikenvildamatilda.se
appreciate all the help I can get
Saw the change you did... the color of their various modules .... looks good, you would like to show me where to go in and change... needs to to get rid of the blue color??
also saw that you had a different category ... how did you get that idea from??

http://www.barnbutikenvildamatilda.se
Version: 1.5.1.3


New member

Posts

Joined
Sun Aug 21, 2011 5:55 pm

Post by 3wcorner » Wed Mar 07, 2012 7:32 am

your issue is probably due to something else.
the count was added i think in the 1.5.x versions.
PM me, with your contact info, i'll be happy to go over it with you.

Manny E.
3w.

Always a pleasure
Manny E.
3w.


New member

Posts

Joined
Sat Dec 18, 2010 12:27 am
Who is online

Users browsing this forum: No registered users and 80 guests