Dreamhost and Opencart performances suggestion

software development

#1

Hello,

Since I am experiencing a lot of speed issues with Opencarton my Dreamhost hosted website, and I haven’t still that many product on it, I would like to understand better how I can improve the performance of OpenCart. I saw that many people have the same problem so I would like to keep as many suggestion as possible so that this may be helpful to the community.

I used a simple script that counts the memory used by the site, the rendering time and the queries executed ( http://forum.opencart.com/viewtopic.php?t=27918 ) and the results are:

Home Page:
Memory Usage: 3.859047 MB
Execution Time: 0.45361 seconds
119 sql queries executed.

Category Page:
Memory Usage: 3.924782 MB
Execution Time: 0.105379 seconds
180 sql queries executed:

Typical Product Page:
Memory Usage: 4.112862 MB
Execution Time: 0.504734 seconds
130 sql queries executed

Currently the layout is colorful and there are a lot of images, so maybe the amount of memory is correct but, what do you think, should I reduce the amount of memory used with more compression?

The execution time, that in these example is not that long, usually is longer, and sometimes it can takes 5-10 seconds. Moreover I’m not sure if I can trust the result of the function of PHP, microtime.

I am surprised that the amount of MySQL queries are that many! Is that possible ? 180 queries in order to load a category page that shows 15 products is an average number?

What I did to try to optimize the site is:

  • Added more indexes to the Database in order to improve the search of the queries.
  • Added a few caching optimizations to the .htaccess file

In your experience what mostly influences the speed of Opencart? Is there a way that I can have better performances ? When I will have more products and categories up and the traffic will increase things can get slower there, so I would like to improve the performance.

Do you have any suggestion about different ways to improve the speed? Caching pages, Caching Queries, better .htaccess settings, whatever suggestion is appreciated!

Thanks.