• Resolved Dan14

    (@dan14)


    First I want to say that this is a great plugin. I am trying to further optimize my site and I cant seem to find what affects the time to first byte. Can you please highlight what I need to look for in the queries?

    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Everything that QM shows you will affect the TTFB unless you’ve specifically implemented implicit flushing in PHP. This is because PHP waits for the whole of the page to be generated before sending it to the browser.

    Your TTFB will be at least the time shown under “Page generation time” in the overview at the top of QM, plus the DNS lookup time, plus the time taken for the request and response to pass over the network, etc.

    As a rule of thumb, any individual database query over 0.05 seconds is very slow (and QM will highlight it as such), and on a modern server you shouldn’t expect to see queries taking longer than 0.01 seconds.

    You’ll usually find that the query time isn’t a big factor in the time your page takes to generate. Unfortunately QM isn’t very good at exposing other points on the page where slowdown occurs (it’s in the works), but server side HTTP API requests can be a factor, so keep an eye out for those.

    Thread Starter Dan14

    (@dan14)

    Thank you for your reply. My queries are relatively low but the TTFB is too high for my liking. Its around 800ms. Im not a professional but someone sent me a screenshot and apparently the first page has 1.7k bottlenecks.

    I just discovered what bottlenecks are and I want to get the TTFB down. The server is itself is very fast but something is affecting the TTFB and I have no clue what it is. I did some research so I know what could be affecting but I can’t get it down low enough.

    The plugin helped me reduced the loading speed but not the TTFB. Can you give me any suggestions how I can use the plugin to fix this?

    Thanks in advance.

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    If your queries are fast and you don’t have lots of non-SELECT queries running all the time and you don’t have HTTP API calls running all the time, then your best bet is to look at a plugin such as P3 Profiler which helps you identify which plugins on your site are slow by selectively disabling them and profiling your site.

    If you’re comfortable using the command line, you could also install WP-CLI along with the wp profile package which will allow you to identify why WordPress is slow.

    HTH!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘First byte queries’ is closed to new replies.