Post by LoveMortuus » Wed Dec 13, 2017 6:04 pm

Hello,
We've been setting up an Opencart 3 store for almost a month now, an the more we've been setting it up the slower the store has been running, now that we're closing to the end of the setup the site is SUPER slow, Google Chrome requires up to 20 seconds to load the site, and this really shouldn't be happening...

If anyone has any info please do tell,
you can access our store at this link.

Newbie

Posts

Joined
Mon Oct 23, 2017 5:09 pm

Post by straightlight » Wed Dec 13, 2017 10:25 pm

No OC version provided. However, ensure to disable the categories count from your admin - > systems - > settings - > edit settings page.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by IP_CAM » Thu Dec 14, 2017 3:30 am

Well, just have a look at a Browser Source View Page like:

https://8000plus.si/RAZVOJ/kcgsi/openca ... 2_143_144

to then be confronted with a left side Category design, using just a little below 3'000 Code Lines,
and also with wide open spaces of NOTHING in between. You attempt to display each and every
Category, and this has a dramatic effect on Page Load, whereever the Category Section is displayed.
There are 2953 DOM elements on that more or less empty page !
---
Otherways, check this Link, to easy find out, what else could be done, to further improve Performance:
https://gtmetrix.com/reports/8000plus.si/OEfuz1hB
Good Luck! ;)
Ernie

I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'100+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by LoveMortuus » Thu Dec 14, 2017 4:01 pm

IP_CAM wrote:
Thu Dec 14, 2017 3:30 am
Well, just have a look at a Browser Source View Page like:

https://8000plus.si/RAZVOJ/kcgsi/openca ... 2_143_144

to then be confronted with a left side Category design, using just a little below 3'000 Code Lines,
and also with wide open spaces of NOTHING in between. You attempt to display each and every
Category, and this has a dramatic effect on Page Load, whereever the Category Section is displayed.
There are 2953 DOM elements on that more or less empty page !
---
Otherways, check this Link, to easy find out, what else could be done, to further improve Performance:
https://gtmetrix.com/reports/8000plus.si/OEfuz1hB
Good Luck! ;)
Ernie
Thanks for the help,
Do you know how else could I do the category section, we choose this one because it was the one that we found in the extension market and was the closest to what we wanted, even though it wasn't fully what we wanted, sadly the extension support for OC 3 isn't that good for now, so we don't really know what to do...

And because the design is done in Twig we have even less of an idea as to what to do...
I do think that it should be done recursively, but I don't know how to do that, because we mostly use other languages. If you have any ideas or advices please do share them!

Newbie

Posts

Joined
Mon Oct 23, 2017 5:09 pm

Post by Pallavi_G » Thu Dec 14, 2017 4:27 pm

Below three are the main reasons for your Opencart website being slow -
  • Your hosting service isn't good enough.
    If your module installed is buggy it is making a lot of wrong queries.
    There are several high-quality images.
Check for good hosting -
You can check the reviews for different hosting companies or ask a query to the hosting company's support team and check if they solve it correctly. This can help you to choose a good hosting.

To Prevent Buggy Module :
Check the ratings and comments prior to purchasing an extension.
You can also ask a doubt to developer and check if you get a response or not. If you don’t get the response for a long time, then response shall be mostly slow. So, think before purchase.

Avoid High Quality Image :
On home page avoid using a high quality image in banners or slide shows. Have an equal portion of text and images. So home page loads quickly.

Besides above, you can also test your site at Website Speed and Performance Optimization.
They give you error report which you should try to fix it. Its free.

Newbie

Posts

Joined
Thu Dec 14, 2017 1:58 pm

Post by LoveMortuus » Mon Dec 18, 2017 4:14 pm

There are so many DOM elements because this store has around 1200 categories.
Is there a way to tell twig to only load those categories that are currently visible?
Because I do believe that doing so could solve the slow loading problem.

Newbie

Posts

Joined
Mon Oct 23, 2017 5:09 pm

Post by IP_CAM » Tue Dec 19, 2017 3:27 am

Well, after looking into the OC v.3.0.2.x Code, I found very similar Lines in my OC v.1.5.6.5,
when it comes to the Routine, as shown below, used to speed up this Task and so OC !

So, one could try, if this Budgetneon.com designed Category CACHE System still works,
by adapting this OC v.1.5.6.x Line:
$cacheid='product.gettotalproducts.'.md5($sql).(int)$customer_group_id;
to make the DB Access work with OC v.3.x, then, the Categories Numbers would
be called from the Cache Section, and no longer counted from/in the DB, and this usually
improves Category Counting Performance very very mucho. :D
---
It's the catalog/model/category/product.php File, wich has to be modified:
DEFAULT OC Code OC v.1.5.x - 3.x:

Code: Select all

	if (!empty($data['filter_manufacturer_id'])) {
		$sql .= " AND p.manufacturer_id = '" . (int)$data['filter_manufacturer_id'] . "'";
	}
	
		$query = $this->db->query($sql);

	return $query->row['total'];
}
to be replaced with THIS:

Code: Select all

	if (!empty($data['filter_manufacturer_id'])) {
		$sql .= " AND p.manufacturer_id = '" . (int)$data['filter_manufacturer_id'] . "'";
	}

//JTI MOD  v.1.5.6.x, WILL NOT work in OC v.2.1.+ this way !!
//  $query = $this->db->query($sql); // default OC Line
//  return $query->row['total']; // default OC Line
$cacheid='product.gettotalproducts.'.md5($sql).(int)$customer_group_id;
$total=$this->cache->get($cacheid);
if ($total === null ) {
$query = $this->db->query($sql);
	$total = $query->row['total'];
	$this->cache->set($cacheid,$total);
  }
return $total;
// END JTI MOD
}
Hopefully, someone of the v.3 Insiders will be willing to change and test it.
Good Luck! ;)
Ernie
---
PS: A different nice Version, by WeismannWeb.com, adding all those Numbers into one single file,
separated into Header- and Category Files, containing other cached Data too, can be found here,
it's much more compehensivly coded, and would require a total rewrite, to make it work
in V.2 + Versions, just to mention this. I use 'em both, in my 1.5.6.5 Version Sites, depending on Mood :laugh:
http://www.codegist.net/snippet/xml/cac ... annweb_xml
and it's cache files look like this. Performance-wise, it's about the same, by use of a few Cat's only... ::)
Image
---
Budgetneon.com Category Cache Solution:
Image

Attachments

weisman_web_category_cache_opencart.jpg

weisman_web_category_cache_opencart.jpg (137.67 KiB) Viewed 5471 times

budgetneon_com_category_cache_opencart.jpg

budgetneon_com_category_cache_opencart.jpg (106.69 KiB) Viewed 5479 times


I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'100+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by LoveMortuus » Tue Dec 19, 2017 11:35 pm

There are only about 6 products in the store at the moment, so that's not slowing it down right now.
What is slowing it down is website loading all categories even though we can only see 1% of them at any given time...

We need to somehow tell twig or the site to only load the visible categories, and not all of them.
Because what it does now is it loads all of them and it then folds them...

Side question: Is OpenCart using pthread?

Newbie

Posts

Joined
Mon Oct 23, 2017 5:09 pm

Post by straightlight » Tue Dec 19, 2017 11:41 pm

What is slowing it down is website loading all categories even though we can only see 1% of them at any given time...
If you are referring to the categories module, you could disable the category count from the admin - > system - > settings - > edit settings page and the same could be adjusted with your product counts per page on the edit settings page in order to reduce the query results for your products.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by IP_CAM » Wed Dec 20, 2017 11:27 am

Well, just turning of the Category count is similar to turning off the Lights,
if one plans to save energy, but Visitors don't like to click around in categories,
to eventually then be confronted with empty Pages only. ::)

One reason, why I never use latest OC - Versions, when it comes to solve minor
Problems like this, it's the lack of expertise, preventing one, from making something
work, as it actually should, by default. :'(
Good Luck! ;)
Ernie

I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'100+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by LoveMortuus » Wed Dec 20, 2017 3:51 pm

straightlight wrote:
Tue Dec 19, 2017 11:41 pm
What is slowing it down is website loading all categories even though we can only see 1% of them at any given time...
If you are referring to the categories module, you could disable the category count from the admin - > system - > settings - > edit settings page and the same could be adjusted with your product counts per page on the edit settings page in order to reduce the query results for your products.
We're already tried disabling this, but it didn't change anything...

Ugh! This is so annoying!

But if we set up OC2 then we need to create all the 1200+ categories again!

Newbie

Posts

Joined
Mon Oct 23, 2017 5:09 pm

Post by straightlight » Wed Dec 20, 2017 8:57 pm

LoveMortuus wrote:
Wed Dec 20, 2017 3:51 pm
straightlight wrote:
Tue Dec 19, 2017 11:41 pm
What is slowing it down is website loading all categories even though we can only see 1% of them at any given time...
If you are referring to the categories module, you could disable the category count from the admin - > system - > settings - > edit settings page and the same could be adjusted with your product counts per page on the edit settings page in order to reduce the query results for your products.
We're already tried disabling this, but it didn't change anything...

Ugh! This is so annoying!

But if we set up OC2 then we need to create all the 1200+ categories again!
If the results are the same after disabling / reducing the counts, it may be caused by multiple factors due to the extensions installed that one or many may affect performance or the server packages level you have purchased with your host or also the limited hardware capacity that your host may offer overall since it is pretty rare, otherwise, that we see these kinds of posts on the forum related to the core level when either the category count is disabled and / or the page result limit has been reduced.

One thing is for sure, despite what the pessimist might post above your post, it is not related to an OC version issue in this case that is beyond v1.5x releases.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by LoveMortuus » Wed Dec 20, 2017 9:54 pm

If we decrease the number of categories the website runs faster, but our customer wants to have this many categories.
The website is not limited by the host or the hardware, we host our own sites and we have brand new servers, so I don't think that's the problem.

Newbie

Posts

Joined
Mon Oct 23, 2017 5:09 pm

Post by straightlight » Wed Dec 20, 2017 10:05 pm

LoveMortuus wrote:
Wed Dec 20, 2017 9:54 pm
If we decrease the number of categories the website runs faster, but our customer wants to have this many categories.
The website is not limited by the host or the hardware, we host our own sites and we have brand new servers, so I don't think that's the problem.
On your host console, click on your latest visitors stats. Then, click the view icon. What are your stats level?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Wed Dec 20, 2017 10:49 pm

A relative subject seem to be continuing on this topic: viewtopic.php?f=190&t=200595

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by IP_CAM » Thu Dec 21, 2017 12:31 am

One thing is for sure, despite what the pessimist might post above your post, it is not related to an OC version issue

Well, many categories have always been an OC performance issue, regardless of the Version,
and most OC Users, around OC for some time, are well aware of this fact. But instead of trying
to get personal, one could better assist others, to eventually find easy Solutions, possibly even
by use of already existing old Code. It would sure be much more helpful, and less ideologistic,
compared with, what Posters lately find on ever the same two liner replies. And if, then such
should be a matter for those, in charge of this place, I assume...

But I am not pessimistic, and sure not an Ideologist either, I just count on facts and experience,
gattered by also creating a well-done 3-digit amount of different OC Versions Testshops, in
about 15k hours. This, to find out, what is required to know, have, and use, to eventually end up
with a 100% Performance result. That's all, I was looking for, but sure not for arguments, those,
I can have at home with my Wife, and in my own language too ...

Ernie
----
I am glad, I have it made, it's time, to take a rest. ::)
---
Image

I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'100+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by alexmorco » Thu May 03, 2018 11:14 pm

Sometimes it happens due to sever issue or slow hosting, Try Cloudways opencart hosting, hope their support team will fix your issue.

Newbie

Posts

Joined
Wed Jan 31, 2018 6:43 pm

Post by sw!tch » Fri May 04, 2018 1:53 am

alexmorco wrote:
Thu May 03, 2018 11:14 pm
Sometimes it happens due to sever issue or slow hosting, Try Cloudways opencart hosting, hope their support team will fix your issue.
^ What he said. This almost certainly a hosting issue, but really depends on your current server specs. I would contact your hosting provider and ask them why your website is slow, chances are they are limiting resources, especially if this is cheap shared hosting. You can log slow queries in mySQL to give you an idea on where it's coming from.

If you are pulling 1200 categories at once and the server doesn't have enough resources then thats most likely the problem, you need to implement cacheing and or upgrade your hosting specs.

If you have SSH access you can easily see the load by running "top" and refreshing the page. It will give you an idea on the resource and CPU usage.

Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by cemfirat » Thu Mar 28, 2019 7:20 pm

I have the same Problem… i think the server reaction … ho can i test it?

Newbie

Posts

Joined
Sat Mar 02, 2019 4:30 pm
Who is online

Users browsing this forum: No registered users and 39 guests