Post by tominabox » Tue Nov 29, 2011 3:27 am

moneycarlo, can you show the changes you made? My site has many categories and I don't need the count, I just want it to load faster. Right now I'm probably taking 25-45 seconds depending on how many people are using my site at once.

Newbie

Posts

Joined
Tue Oct 25, 2011 1:45 am

Post by cartpro » Tue Nov 29, 2011 4:56 am

You may want to cache it at the higher level in catalog/controller/header.php after collecting category information.
you need to cache the category you store in

Code: Select all

 $this->data['categories'] 
This worked well for me with 2000+ categories. This may be slow on the first call but much faster after that.

Ideally, I would like to cache the rendered html output which will make your site run even faster.

Extensions: Multi-vendor extension
Shipping Modules: SuperShip Pro

Multi-Vendor Marketplace:Opencartmarketplace.com
IceCat to Opencart: Import millions of IceCat products to Opencart


New member

Posts

Joined
Fri Oct 29, 2010 1:50 am

Post by rph » Tue Nov 29, 2011 5:12 am

cartpro wrote:Ideally, I would like to cache the rendered html output which will make your site run even faster.
There's at least one commercial mod (OpenCart Page Cache) that does this.

-Ryan


rph
Expert Member

Posts

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

Post by tominabox » Wed Nov 30, 2011 2:59 am

Cartpro, I have no idea what you mean. Should I add something to that file, change something, remove something?

Newbie

Posts

Joined
Tue Oct 25, 2011 1:45 am

Post by alex1 » Wed Nov 30, 2011 11:54 am

Was this fixed in 1.5.1.3? I commented out the product_total and the site loads fast after a first slow load...

Active Member

Posts

Joined
Sat Oct 16, 2010 9:49 am

Post by cantykiwi » Thu Dec 01, 2011 6:36 am

No, problem still seems to be there in 1.5.1.3 and 1.5.2.

New member

Posts

Joined
Mon Sep 13, 2010 12:37 pm

Post by alex1 » Thu Dec 01, 2011 12:40 pm

I made my navbar static, so it doesn't pull the categories, and removed all of the code from header.php. Seems to have sped it up a little... now the site only load the categories once (in the sidebar)

im going through index.php and looking at some queries that aren't needed. For example, my site is only in english, so I tried to hardcode $languages[0] = 'en'; but it threw an error on this line:

Code: Select all

$config->set('config_language_id', $languages[$code]['language_id']);
any ideas?

trying to see what else i can hard code in there...

Active Member

Posts

Joined
Sat Oct 16, 2010 9:49 am

Post by annelim » Thu Dec 01, 2011 12:47 pm

Xsecrets wrote:
onlinephilately wrote:OK, I just uploaded the xml file into the vqmod/xml folder (it's the first time I use vQmod).

The site is returning a blank page...
so you installed vqmod and tested and everything was working fine, but then when you put the vqmod file from this post in the vqmod/xml folder you got a blank page? Have you made any other modifications to your files? If you changed any of the stuff I'm searching on it could cause problems.
urgent help. after reading the thread, and i download your 2nd version mod, install. page blank. then uninstall it. back to normal.
after that i try edit the core file of course i do backup it. also blank page.
i replace back the original file. but also blank page....
i understand there is few file need to modify, so i follow xml code edit the core file. but end up now blank even recover back the original file.....where is goes wrong????? please help ??? my page totally BLANK.......BLANK.....BLANK....i just want recover it back to normal...how do to?????? OC. 1.5.1.3 vqmod 2.1.5

Active Member

Posts

Joined
Fri Oct 28, 2011 5:13 pm

Post by alex1 » Fri Dec 02, 2011 11:10 am

I sent daniel a PM, and asked him to look at this thread to help us solve this categories issue. Daniel read the PM but never replied to the PM or posted in this thread.

Doesn't look like he's too interested, unfortunately. :(

Active Member

Posts

Joined
Sat Oct 16, 2010 9:49 am

Post by Xsecrets » Fri Dec 02, 2011 12:10 pm

well all my vqmods in this file are specifically for v 1.5.0.5 they will not work with v1.5.1+ as the categories stuff was changed. If you are using them on the right version they should work fine. if you have 1.5.1 you'll want to look for the mod that removes product counts.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by alex1 » Fri Dec 02, 2011 12:30 pm

Xsecrets wrote:well all my vqmods in this file are specifically for v 1.5.0.5 they will not work with v1.5.1+ as the categories stuff was changed. If you are using them on the right version they should work fine. if you have 1.5.1 you'll want to look for the mod that removes product counts.
I removed product counts manually, and it still has the slow initial load, then faster once cache kicks in...

Active Member

Posts

Joined
Sat Oct 16, 2010 9:49 am

Post by alex1 » Mon Dec 12, 2011 11:59 pm

Xsecrets wrote:well all my vqmods in this file are specifically for v 1.5.0.5 they will not work with v1.5.1+ as the categories stuff was changed. If you are using them on the right version they should work fine. if you have 1.5.1 you'll want to look for the mod that removes product counts.
What category stuff was changed in 1.5.1+?

I have a slow loading 1.5.1.3 with the default products. My 1.4.9.6 is much faster.

Active Member

Posts

Joined
Sat Oct 16, 2010 9:49 am

Post by audiojam » Fri Feb 15, 2013 12:52 am

Hello,

I'm new to all this script talk and my site is running very slow and getting having the same problems as everyone else here. i have downloaded the xml. file but don't know where to put it or what to do next.

My site name is: www.caraudiocaraudio.com and if you click thru the site you will see how slow it is. I need help. Can you tell me what to do with the file to get my site running faster.

My: tmp/mysql_slow_queries (have alot of these in them)


# Query_time: 1.827261 Lock_time: 0.000092 Rows_sent: 1 Rows_examined: 2780
use audiojam_caraudio;
SET timestamp=1360850619;
SELECT COUNT(DISTINCT p.product_id) AS total FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN product_to_category p2c ON (p.product_id = p2c.product_id) WHERE pd.language_id = '1' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND (p2c.category_id = '112')

Newbie

Posts

Joined
Fri Feb 15, 2013 12:48 am

Post by baha90210 » Sun Feb 17, 2013 12:24 pm

Hi guys

The solution is pretty easy: just add a few indexes on some database tables.
I am running a shop in 1.5.5 with 83 categories.
A page load took approximately 22 seconds!! After adding some indexes, it takes approximately 1.5 seconds.

Here's what I added:
on table product_description: index on field product_id
on table product_description: index on field language_id
on table product_to_store: index on field product_id
on table product_to_category: index on field product_id
on table product_to_category: index on field category_id

Disabling the product count option in the backend has no impact on the performance.
It only has impact on what is shown or not.
The queries are still executed, so there's no improvement in load times.

Cheers

Bart

Newbie

Posts

Joined
Fri Jan 27, 2012 5:08 pm

Post by powerranger520 » Fri Feb 22, 2013 2:56 pm

you also can modify the controller category module :

$total = $this->model_catalog_product->getTotalProducts(array('filter_category_id' => $category['category_id']));

modify as
if($this->config->get('config_product_count')){
$total = $this->model_catalog_product->getTotalProducts(array('filter_category_id' => $category['category_id']));
}else{
$total=0;
}

the another place is :
$product_total = $this->model_catalog_product->getTotalProducts($data);

modify as:
if($this->config->get('config_product_count')){
$product_total = $this->model_catalog_product->getTotalProducts($data);
}else{
$product_total = 0;
}

my opencart shop www.powerranger.co , it's a power rangers costume online shop



Posts

Joined
Fri Feb 22, 2013 2:47 pm

Who is online

Users browsing this forum: No registered users and 10 guests