📜 ⬆️ ⬇️

output to PHP

I want to know how to speed up the "output" of a page written in php?

The code is:
$start=microtime(true);

echo $html;

echo microtime(true)-$start;
The page is loaded via the network via http request.
The result of the script:
0.023 - that is, a loss of 0.02 sec per 20 kilobytes of text.
Dedicated server - Athlon 2800 + / 512 ram / 10 Mbit / Linux,
Apache 2 + eaccelerator + php 5.2.4. (combining server with client network - 10 Mbit)

Tell me:
Why is this happening?
How can this be accelerated?
Interested in installing something like nginx or lighttpd?
')
Thank.

Upd.
The decision was already discussed here: habrahabr.ru/blogs/php/45016 (thanks to DYPA and the author of the topic gnomeby )

Source: https://habr.com/ru/post/56376/


All Articles