Page 4 of 4

Re: 1.5.0.5 very slow

Posted: Tue Nov 29, 2011 3:27 am
by tominabox
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.

Re: 1.5.0.5 very slow

Posted: Tue Nov 29, 2011 4:56 am
by cartpro
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.

Re: 1.5.0.5 very slow

Posted: Tue Nov 29, 2011 5:12 am
by rph
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.

Re: 1.5.0.5 very slow

Posted: Wed Nov 30, 2011 2:59 am
by tominabox
Cartpro, I have no idea what you mean. Should I add something to that file, change something, remove something?

Re: 1.5.0.5 very slow

Posted: Wed Nov 30, 2011 11:54 am
by alex1
Was this fixed in 1.5.1.3? I commented out the product_total and the site loads fast after a first slow load...

Re: 1.5.0.5 very slow

Posted: Thu Dec 01, 2011 6:36 am
by cantykiwi
No, problem still seems to be there in 1.5.1.3 and 1.5.2.

Re: 1.5.0.5 very slow

Posted: Thu Dec 01, 2011 12:40 pm
by alex1
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...

Re: 1.5.0.5 very slow

Posted: Thu Dec 01, 2011 12:47 pm
by annelim
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

Re: 1.5.0.5 very slow

Posted: Fri Dec 02, 2011 11:10 am
by alex1
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. :(

Re: 1.5.0.5 very slow

Posted: Fri Dec 02, 2011 12:10 pm
by Xsecrets
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.

Re: 1.5.0.5 very slow

Posted: Fri Dec 02, 2011 12:30 pm
by alex1
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...

Re: 1.5.0.5 very slow

Posted: Mon Dec 12, 2011 11:59 pm
by alex1
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.

Re: 1.5.0.5 very slow

Posted: Fri Feb 15, 2013 12:52 am
by audiojam
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')

Re: 1.5.0.5 very slow

Posted: Sun Feb 17, 2013 12:24 pm
by baha90210
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

Re: 1.5.0.5 very slow

Posted: Fri Feb 22, 2013 2:56 pm
by powerranger520
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;
}