A lot of CPU time could be saved by redirecting to the original file internally in nginx/Apache without streaming the file through PHP:
|
if (@readfile($filename) === false) { |
https://idiallo.com/blog/making-php-as-fast-as-nginx-or-apache
This is natively supported in nginx through the X-Accel-Redirect header. Apache needs a small 3rd party module, mod_xsendfile.
A lot of CPU time could be saved by redirecting to the original file internally in nginx/Apache without streaming the file through PHP:
webp-convert/src/Serve/ServeFile.php
Line 128 in 8894af5
https://idiallo.com/blog/making-php-as-fast-as-nginx-or-apache
This is natively supported in nginx through the
X-Accel-Redirectheader. Apache needs a small 3rd party module, mod_xsendfile.