Post by head_dunce » Wed Nov 27, 2019 5:02 am

I've recently been able to get back to trying to migrate to OpenCart. I started this project in the spring, but was short staffed during the summer so had to put everything on hold. My current store has been on Yahoo for 13 years now, and that's obviously not the place to be anymore. Anyway, I just wanted to post about some of the simple things that have made a HUGE difference in speed with OpenCart. I've got over 7,000 product pages and many categories.

I kicked up a CentOS 7 server on DigitalOcean for $5 a month. Nothing fancy, standard install. Apache 2.4.6 / MariaDB. 5.5.64 / PHP 5.4 with OpenCart 7
It's nice to have it on a small space, then open up a whole mess of pages at once to see what happens. Of course I'll move it to a bigger space once it goes live.

I use this to test page speed overall
https://developers.google.com/speed/pagespeed/insights/
Out of the box, the problem was clearly TTFB

First big gain was with Apache, you'll want to use it's compression by adding in this to the Apache config

Code: Select all

<IfModule mod_deflate.c>
  # Compress HTML, CSS, JavaScript, Text, XML and fonts
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE font/opentype
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/xml

  # Remove browser bugs (only needed for really old browsers)
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  Header append Vary User-Agent
</IfModule>
Second big gain was upgrading PHP to 7.2 which is probably because opcache is installed by default in 7.2 I have not tested PHP 5.4 with opcache, and so far everything seems to be good with 7.2 so I don't think I'll go back.

Next was changing the DNS to cloudflare to use their CDN. This didn't make a huge difference, but it was simple. I also like that they can do something if the site goes under attack.

I also changed the database tables from myisam to innodb and played around with some indexes. It helped a little.

Hope this helps someone else.

Jim
https://www.carguygarage.com
Yahoo Store since 2006 moved to OpenCart on January 24, 2020


Active Member

Posts

Joined
Thu Apr 04, 2019 11:50 pm

Post by IP_CAM » Wed Nov 27, 2019 7:38 am

Try this one:
10 ways to speed up the Opencart 3 – website speed optimization
https://webocreation.com/blog/10-ways-t ... imization/
and if one does not like OcMod, I made an (untested) VqMod out of it, and
added it as Extension below, since some parts might be usable for lower versions also ... :D

I am no longer active at this Forum.
Please don't send Personal Messages, contact: jti@jacob.ch
---
Github OC Downloads: https://github.com/IP-CAM
2'000+ FREE OC Extensions from the World's largest Github OC Archive.


User avatar
Legendary Member

Posts

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

Post by head_dunce » Wed Nov 27, 2019 10:47 am

Thanks for the tips. A lot of that I already am doing or are actually built into Journal 3 (which I know is unpopular in this forum.) It seemed the best gains were from Apache compression and the PHP upgrade though, that really cut the TTFB down a lot. Other things have helped, but not by the same margins.

Jim
https://www.carguygarage.com
Yahoo Store since 2006 moved to OpenCart on January 24, 2020


Active Member

Posts

Joined
Thu Apr 04, 2019 11:50 pm

Post by IP_CAM » Wed Nov 27, 2019 5:57 pm

Well, Journal is not unpopular around here, but it's a commercial Theme,
and it's also the most stolen Extension as well. And it really makes no sense,
to support Crooks and Thiefs, that's why most honest People will not support
such Elements around here. Noboby should, because they don't deserve it,
they only come here, to take, but never give anything back anyway.

I am no longer active at this Forum.
Please don't send Personal Messages, contact: jti@jacob.ch
---
Github OC Downloads: https://github.com/IP-CAM
2'000+ FREE OC Extensions from the World's largest Github OC Archive.


User avatar
Legendary Member

Posts

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

Post by head_dunce » Wed Nov 27, 2019 11:50 pm

I paid for it. It's only $55. I hope you're not implying I'm a crook. I'm ok with being called crazy, but I'm not a criminal.

Jim
https://www.carguygarage.com
Yahoo Store since 2006 moved to OpenCart on January 24, 2020


Active Member

Posts

Joined
Thu Apr 04, 2019 11:50 pm

Post by IP_CAM » Thu Nov 28, 2019 12:01 am

Well, I did NOT mean you, it was a 'global' statement only, trying to
explain, why Journal is NOT a matter of discussion on this Forum.
It's not even published in the OC Extension Section, why then should
anyone care about it here ... 8)

I am no longer active at this Forum.
Please don't send Personal Messages, contact: jti@jacob.ch
---
Github OC Downloads: https://github.com/IP-CAM
2'000+ FREE OC Extensions from the World's largest Github OC Archive.


User avatar
Legendary Member

Posts

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

Post by head_dunce » Thu Nov 28, 2019 4:05 am

Well, probably should care about it since it's one of the most popular extensions. Usually a good idea to listen to your customers. I mean imagine if it's functionality was part of the base code.

Jim
https://www.carguygarage.com
Yahoo Store since 2006 moved to OpenCart on January 24, 2020


Active Member

Posts

Joined
Thu Apr 04, 2019 11:50 pm

Post by IP_CAM » Thu Nov 28, 2019 5:26 am

Well, if Journal would be built-in, among a few other popular Mods,
there would be no after-market for Themes and other Mods, it's as
easy as that ... :choke: :laugh:

But OpenCart is not a Social Network, consisting out of a couple of Fellows,
trying to secure their place in heaven, but just another Business-Model, and
that's the reason, why free OC only comes as a 'basic' Construction.

And Journal is not only a Theme Extension, it's a widely different Software,
just using parts of the default OC Code. It's about 1'700 Files, with 54 MegaByte
of CUSTOM Code and Images, added to a Stock OC, containing about 4090 Files
in an OC 3, just to visualize, how much foreign Files are added.

Compared to just about 100 Files, used by a 'regular' fully equipped Custom
Theme, consisting out of a Theme Directory with about 3 main Subdirectories.
No wonder, most standard extensions won't work ...

Good Luck! :D
Ernie

I am no longer active at this Forum.
Please don't send Personal Messages, contact: jti@jacob.ch
---
Github OC Downloads: https://github.com/IP-CAM
2'000+ FREE OC Extensions from the World's largest Github OC Archive.


User avatar
Legendary Member

Posts

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

Post by head_dunce » Thu Nov 28, 2019 10:05 am

I hear ya. As it currently is, the OC web site can't even feature nice web sites that use their code which should be simple. And I know how that goes, you get so trapped in looking at code you forget about what you're really doing. I just hope someone at the core code level breaks the daily cycle and wakes up to the core mission. I really believe OC could beat out Shopify if it got its head of out of the geek realm and stared at business for a while. Until then, coders will beat each other up around here which is a shame. Pissing contests are a waste of time. If everyone who works on OC could play nice together, it'd be unstoppable.

Jim
https://www.carguygarage.com
Yahoo Store since 2006 moved to OpenCart on January 24, 2020


Active Member

Posts

Joined
Thu Apr 04, 2019 11:50 pm

Post by IP_CAM » Thu Nov 28, 2019 10:25 pm

I just hope someone at the core code level breaks the daily cycle
Well, there is only one, who makes decisions... :laugh: But everybody is free, to
do it in his/her own way, if one is willing and able to.
Good Luck! ;)
Ernie

I am no longer active at this Forum.
Please don't send Personal Messages, contact: jti@jacob.ch
---
Github OC Downloads: https://github.com/IP-CAM
2'000+ FREE OC Extensions from the World's largest Github OC Archive.


User avatar
Legendary Member

Posts

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

Post by victorj » Thu Feb 20, 2020 7:05 am

upgrading to mariadb 10+ will add more speed as wel.
run mysql tuner and optimze my.ini will do some good as well

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by sw!tch » Thu Feb 20, 2020 7:51 am

Also running PHP-FPM is probably one of the biggest improvements I have seen. If not running PHP-FPM definitely look into it, speed increase is pretty significant when properly setup and compared to other PHP handlers.

Backup and [ learn how to recover ] before you make any changes.


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Who is online

Users browsing this forum: No registered users and 6 guests