WebPagetest Forums
Site had very slow loading time (16-20 Secoonds) - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: Site had very slow loading time (16-20 Secoonds) (/showthread.php?tid=7607)

Pages: 1 2


Site had very slow loading time (16-20 Secoonds) - homefieldstream - 11-12-2011 09:31 PM

Hello,

My website is loading very slow and i cant seen to figure out what the problem is. From the test results it shows that the content download seems to be the problem (blue bar).

This is the homepage which links to several other subdomains. They two are taking a long to time to load fully aswell.

Test Results

http://www.webpagetest.org/result/111112_5A_25HJA/1/details/

Any help would be greatly appreciated.

Donal


RE: Site had very slow loading time (16-20 Secoonds) - pmeenan - 11-14-2011 11:30 PM

Technically it is the blue bar but it isn't actually downloading content that whole time (the bandwidth utilization is 0). What is happening is that your site is sending out the bulk of it's content quickly and the browser loads what it can but something near the very end is doing a VERY expensive operation on the server which is causing the very last part of the HTML to take 15 seconds before it is generated.

I'd start by looking at anything that comes before wedding-new.jpg in the site code (though it might also come after that and the buffers just don't get flushed out). Odds are that it is going to be a back-end call out to some other service or to a database. It could even be something that isn't user visible (like some back-end process that tracks stats).

If you can track it down and fix/remove the expensive operation it will also SIGNIFICANTLY improve your server capacity because that long operation is also tying up one of your server connections for the 15+seconds.


RE: Site had very slow loading time (16-20 Secoonds) - homefieldstream - 11-15-2011 12:40 AM

Thanks for the advice, i have been looking through all my files to try find the very expensive operation but am having no look.

I have went through the backend files, could it also be included in a function or class files..?

Is there any way (program or trick) to find out which file or part of code is causing the problem.

At least i know what im looking for now.

many thanks

Donal


RE: Site had very slow loading time (16-20 Secoonds) - pmeenan - 11-15-2011 01:14 AM

Yes, it could be included in a function, class or module.

If you have access to the server to install php modules, New Relic has a 14 day free trial of their software which should be able to tell you exactly where the time is going ( http://newrelic.com/ ).


RE: Site had very slow loading time (16-20 Secoonds) - LeptienM - 11-15-2011 01:52 AM

Hi!

I used WPTs TCPDump feature, and there it is visible, that you receive two chunks, totalling in 2444 Bytes, rather immediately. And then, after some 15 seconds, you get the final 430 Bytes. Unfortunately the answer is gzipped, so you can't see, what is in the last 430 Bytes (@Pat: How about a feature, that let's you disable Accept-Encoding GZIP Headers? :-) )
Looking at the decompressed response, the bottom area of the Page's source right before the wedding image, and after the last quickly loaded image, looks like this:

Quote: <div class="box2"><a href="http://hfs-online.com/wedding_lists.php"><img src="images/wedding-new.jpg" width="470" height="250" border="1" /></a></div>

</div>


<!-- body_eof //-->

<!-- footer //-->
<div id="footercontainer">
<div class="footermenu">
<a href="http://hfs-online.com/new.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Company</a> |

<a href="http://hfs-online.com/products_new.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">New products</a> |

<a href="http://hfs-online.com/wedding_lists.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Wedding/Engagement Lists</a> |

<a href="http://hfs-online.com/contact_us.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Contact Us</a> |

<a href="http://hfs-online.com/store_location.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Store Location</a> |

<a href="http://hfs-online.com/account.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">My Account</a> |

<a href="http://hfs-online.com/checkout_shipping.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Checkout</a> |

<a href="http://hfs-online.com/reviews.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Reviews</a> |

<a href="http://hfs-online.com/security.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Security</a> |

<a href="http://hfs-online.com/terms_conditions.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Terms & Conditions</a> |

<a href="http://hfs-online.com/returns.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Returns</a> |

<a href="http://hfs-online.com/sitemap.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Site Map</a>
</div>

<div class="footerdetails">

Home Field and Stream, Online Sales, 18-20 Church St, Enniskillen, Co. Fermanagh, BT74 7EJ

</div>

<div class="footercopyright">
Copyright &copy; 2011 <a href="http://hfs-online.com/index.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Home, Field & Stream</a> </div>
</div>
<!-- footer_eof //-->

</body>
</html>

Maybe that helps?

Kind regards,
Markus


RE: Site had very slow loading time (16-20 Secoonds) - pmeenan - 11-15-2011 02:01 AM

FWIW, I haven't tried it but you might be able to use the setHeader script command to override the Accept-Encoding header: https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/scripting#TOC-setHeader


RE: Site had very slow loading time (16-20 Secoonds) - homefieldstream - 11-15-2011 02:22 AM

(11-15-2011 01:14 AM)pmeenan Wrote:  Yes, it could be included in a function, class or module.

If you have access to the server to install php modules, New Relic has a 14 day free trial of their software which should be able to tell you exactly where the time is going ( http://newrelic.com/ ).

Found out what the problem was, the .htcaccess file was referencing a file thumbs.bd which slowed the whole site down..

I didnt get round to using the newrelic software, but thanks for pointing me in the right direction.. Chuffed to have finally sorted the problem.

Site now loading in 1.9 seconds. big differences.

http://www.webpagetest.org/result/111114_4P_263QJ/1/details/

thanks again

Donal


RE: Site had very slow loading time (16-20 Secoonds) - pmeenan - 11-15-2011 02:29 AM

Nice. Out of curiosity, how was .htaccess referencing the file? It just seems really strange for it to hit right in the middle of the response (though it could have been hitting at the end and the buffer just hadn't flushed yet).

Glad to see it cleaned up nicely though.


RE: Site had very slow loading time (16-20 Secoonds) - homefieldstream - 11-15-2011 02:34 AM

the line was 'php_value auto_append_file' then the thumbs.db location.

I removed it and it worked.. any idea what it was doing


RE: Site had very slow loading time (16-20 Secoonds) - pmeenan - 11-15-2011 06:08 AM

Looks like it is supposed to automatically add the contents of that file to every response. Never seen that one before.