Website is running slow

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
alwaysonnet
Forum Newbie
Posts: 1
Joined: Wed Feb 19, 2014 9:18 pm

Website is running slow

Post by alwaysonnet »

Hello All,

I am currently working on a dealers website which is developed by someone else.
Being a core Perl developer, assigned to maintain it to perform some tasks to fetch data from wholesaler's site.

My initial assignment is to find - Why is the site running slow?

This is developed on Opencart platform using PHP, MySQL and is hosted on goDaddy server.
Website hosts lots of products along with images..

Here are the few things I troubleshooted:

1) Validated all MySQL tables for indexes. These seems to be fine.
2) Validated all queries. they are also taking very less time when executed in phpmyadmin.
3) Website has only 512MB Physical memory as I see from cPanel
4) I dived deep in PHP code and found that original images are being resized to thumbnails everytime page is being loaded - Is this a potential problem?

What are the other reasons that site could run slow?

Any ideas or thoughts are appreciated.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Website is running slow

Post by Celauran »

Having the images resize on page load is certainly wasteful, both in terms of processing the same thing needlessly over and over, as well as in terms of sending much larger files than you need, which will directly impact load times. If you need thumbnails, why not generate them when the originals are uploaded? Have checked the network tab in the developer console? Looked at YSlow?
Post Reply