by Devin Yang
(This article was automatically translated.)

Published - 8 years ago ( Updated - 8 years ago )

About TTFB:

TTFB(Time To First Byte): The browser is waiting for the first byte of the response. TTFB stands for time to first byte.
This time includes 1 round trip delay and the time for the server to prepare a response.

Key points:

Okay, maybe everyone will wonder that the TTFB time of your host is very long, which means that the host may perform some calculations before the screen can be displayed.
For example, a large number of database queries, or the network is too slow, and other factors, but how to judge?
We can compare whether the HTML static page is very different from the simple PHP dynamic page, and perhaps find out the problem of slow TTFB response.
For example, if the TTFB is 16ms on a static page but when it comes to a dynamic page in PHP, it runs 3xxms without any calculation.
Such a problem may be in the setting of PHP.

You can see if any plug-in is affected, such as Xdebug plug-in with PHP enabled,
At this time, the TTFB will not be 13.36ms below, but may become 2xxms.

So if it is the Porduction version, and Xdeubg is used in php.ini, remember to disable the Xdebug function.

Tags:

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


laravel

In Laravel 5.5, easy to use basic routing

Especially for friends who are studying SEO, we should know that sometimes we need to redirect 301 pages, which is provided in Laravel 5.5 The function of Route::redirect is quite simple. In addition, using Route::view is also very useful for the layout of static pages.

linux,cli

How to use the date command to display yesterday's date

The instructions are different on MacOS or Linux, but achieve the same effect. Let's see how to display yesterday's date with the date command.

Raiders D-Laravel configuration file

D-Laravel is a PHP execution environment using Docker, which puts all services into containers for execution. Database service (db), web server service (web), PHP-FPM service (php)... etc., By defining the docker-compose.yml file, we can easily adjust the database version or PHP version. D-Laravel also creates a simple bash, which can help us adopt docker more quickly to create Laravel projects and complete database settings. Even if you are just a PHP developer, you can actually create your own development environment through D-Laravel. Next, let us understand the settings made by D-Laravel through the official Docker documents.