I'm using this to measure the time through the entire PHP script. On Google Developer Tools, the page has the following time for the loading of my homepage (just the html/txt page - without the images or anything else loading):
Stalled: 2.000 ms
DNS Lookup: 0
Initial Connection: 61.000 ms
Request Sent: 0
Waiting (TTFB): 2.18 s
Content Download: 20.000 ms
I don't understand why TTFB is 2.18 seconds if PHP says the script finishes in 0.38 seconds. I'm assuming my PHP script and MySQL queries are running quickly then...
Is this a network issue or a Dreamhost issue? Is this something I can fix?
The reason this is a problem is because some visitors are complaining about the site lagging and getting too slow at various times. It's inconsistent, sometimes the site is slow and other times is nice and fast.