Lessons

HTML code generation time

The first file that the user receives when visiting the page is HTML code. Only after that the browser downloads the rest of the files.

The norm is when HTML is loaded in 0.3 seconds.

The faster the HTML code of the page is generated, the less load is created on the server. And the greater the peak load it can withstand. For example, generating a page in 0.25 seconds, the server will be able to issue 4 pages per second. But if you speed up page generation to 0.1 seconds, then the server will already be able to serve 10 visitors per second. The key tools to speed up the page are:

  • Caching. Moreover, it is best to use in-memory caching technology like memcache. It demonstrates impressive acceleration.
  • Page profiling. This is when the programmer places timestamps throughout the code. If too much time passes between adjacent labels, it means that the code between them is not optimal and there is potential for optimization.

Finding and speeding up slow sections of code is a process that requires perseverance and high professionalism. A programmer can study the code for several days and fix only 1 line. The task of speeding up is much more difficult than writing new functionality.

Check your website
It's free and will take from 11 to 45 seconds

We use cookies. By continuing to use the site, you agree to the processing of personal data in accordance with privacy policy. I agree