WebPagetest Forums
Long time to load - problem with TTFB - 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: Long time to load - problem with TTFB (/showthread.php?tid=15087)

Long time to load - problem with TTFB - Mattpl - 10-19-2017 04:38 PM

Hi, I'm looking for help.
Here is test result: http://www.webpagetest.org/result/171019_K6_b6bc69c59d26d4ff83c95cf9d7a6d06b/

For now I have made opt. for my apache server and still the same. Apache 2.4 , PHP-FPM 5.6, MariaDB 10.01, dedicated server. In my opinion server is good but code not and this generate long time.

I have second website at the same server (Wordpress) and there load time is good. Results: http://www.webpagetest.org/result/171019_AA_104fab2d89640f9f058bff489f8fe5a1/


some tips? Thanks!

RE: Long time to load - problem with TTFB - josephscott - 10-22-2017 01:09 PM

For a WordPress site there are several things that could be going on. Two of the most common things that I see come are:

- theme or plugin making calls out to 3rd party services at the PHP level
- theme or plugin making a large amount ( or a few slow ) database queries.

Since you mentioned using PHP 5.6, I'd recommend trying out PHP 7. It is significantly faster than PHP 5.X. Before upgrading the live site, test out PHP 7 in a dev environment, to make sure there are no compatibility issues.

RE: Long time to load - problem with TTFB - Mattpl - 10-23-2017 11:55 PM

Thanks for reply, but the first site with long TTFB isn't a WP

RE: Long time to load - problem with TTFB - josephscott - 10-24-2017 12:40 AM

Sorry, I read that as second WordPress site.

The principle is still the same though. Review the code flow for loading the front of the site for things that could be very expensive. Remote calls to other services, slow database calls, anything that involves a lot of work.

RE: Long time to load - problem with TTFB - Mattpl - 10-24-2017 08:52 PM

Joseph thanks for tips! Have a nice day!

RE: Long time to load - problem with TTFB - MachMetrics - 10-25-2017 01:28 AM

Hi Mattpl - Something else to consider is the location of your server in regards to the location you're testing it from. For example, if your servers are in Europe but you're testing from California that would explain it.

Best to test from where most of your customers are located. And if you want a worldwide presence then there are DNS and CDN optimizations you can do for that.

Is the TTFB consistently slow across multiple regions?

RE: Long time to load - problem with TTFB - Mattpl - 10-27-2017 05:25 PM

Hi thanks for reply! I'm testing it from Warsaw and Europe ex. Stockholm.
For now I have change php 5.6 to php 7
Remove some Requests, split css&js and min.

Here another test: https://www.webpagetest.org/result/171027_3Y_4865cd67e6578db68472755e745d076e/

First byte from test 1: 1.450s
First byte from test 2: 1.081s

Using pingdoom tool to test from Stockohlm, time to load website is 1.5s. When I'm using webpagtest to check time for https://szukampracy.pl (loc. Warsaw) I have full load time ~3.7s. Why is this difference? Server location is near Warsaw