3

I've tried searching a lot and basically here is the problem. I have a website but I'm unable to pin point the reasons of why the performance of the website is so slow. We have shifted to a high end server separated the webserver and the database server.

MySQL Caching, HTML / CSS & JS minification is done , All basic issues which Google Speed test and GTmetrix could give is also done but still the initial loading of the website itself takes 3-10 seconds. Some pages load very slow is there any kind of application or server management tool which we can use to track and see what is actually slowing up and then work on fixing it ?

1
  • A suggestion. If you post your url, maybe some one will have a quick look for you. Most likely it is the resources. There is a large hit for each external css, javascript file, and images that are loaded. Jun 21, 2022 at 14:43

3 Answers 3

1

One of the tools i use to diagnose speed issues with web pages is the waterfall diagram. Most modern browsers have this in their developer tools. But even better is webpagetest.org

After you ran your url through webpagetest you can see both the first view and a second load that uses any cached resources.

In the waterfall diagram tou can see which resource is loaded when.

When analysing these waterfalls keep in mind that not all requests are equal. Without the first html request you have nothing. But also keep in mind that css and synchronous javascript can block the browser.

Also some requests may prevent from being fully loaded but being perfectly usable for a user, some icon for instance. So don't focus too much on a page being fully loaded. More important is that the important things are visible and usable.

A good starter may be this free course

1

You can also use Apache Benchmark, but 3 seconds on request tells me that you should debug your code and look for programming errors. Check php logs for clues. If you are using mySql maybe you have some sort of slow query, check the slow-query log file.

Try also to profile your scripts using xdebug or other tools. See this question.

1
  • Using apache benchmark will only tell you how individual requests behave, while in the case of loading webpages a pageload can be slow even if all individual requests repond fast. Using the waterfall you can better determine whats makes an entire pageload slow. It may be an individual request that needs further investigation or a combination of requests that cause the entire page to load slow. The waterfall gives you the overview to determine which requests need further investigation.
    – Marco Tolk
    Nov 8, 2015 at 12:00
1

Expanding Marco's answer, try the browser first. Chrome, Brave and Firefox (and probably most others) have it built in and it is free.

  • Do a right click and select the Inspect option [Ctrl] [Shift] [I] also works.

  • Once the page opens up, Select the Network Tab.

  • Perform a hard reload on your page (Ctrl-F5)

  • This will show you the waterfall diagram.

  • Select the slowest item and target that first.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.