Site had very slow loading time (16-20 Secoonds)


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

Any help would be greatly appreciated.


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.

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


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 ( ).


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? :slight_smile: )
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:


Company |
<a href="">New products</a> | 

<a href="">Wedding/Engagement Lists</a>  |  

<a href="">Contact Us</a>  | 

<a href="">Store Location</a> |  

<a href="">My Account</a>   |  

<a href="">Checkout</a> | 

<a href="">Reviews</a>  | 

<a href="">Security</a> | 

<a href="">Terms & Conditions</a> |  

<a href="">Returns</a> | 

<a href="">Site Map</a>

<div class="footerdetails">	

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


<div class="footercopyright">
Copyright &copy; 2011 <a href="">Home, Field & Stream</a>	</div>

Maybe that helps?

Kind regards,

FWIW, I haven’t tried it but you might be able to use the setHeader script command to override the Accept-Encoding header:

Found out what the problem was, the .htcaccess file was referencing a file 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.

thanks again


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.

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

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

Also looks like it may be the leave-behind signature of a site hack:

Awesome! Works! :slight_smile:

please help my site too,realy slow
i’m worried about google update for mobille friendly site