From 5b030dcc6ff1393e29ecc6e5c76f129c7ad6c914 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 14 Oct 2018 14:37:50 +0200 Subject: Ensure fast flush of HTTP headers and HTML head (#2045) * Ensure fast flush of HTTP headers and HTML head The fast flush optimisation done in https://github.com/FreshRSS/FreshRSS/pull/1133 does not seem to work anymore (need to check if it is related to a PHP version). Work-around when PHP flush() is not working Can be tested by adding a `sleep(5);` after: https://github.com/FreshRSS/FreshRSS/blob/ee902ee7c4370421802768c3105ba269a4f97b16/app/layout/layout.phtml#L27 Follow-up of the performance checks of https://github.com/FreshRSS/FreshRSS/pull/2040 * output_buffering in .user.ini for PHP CGI / FPM * Reuse .user.ini for Docker PHP config * Longer flush Flush a bit later, to be compatible with the default value of 4096 for PHP output_buffering, and thus avoid the need of tuning the value. --- app/layout/layout.phtml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'app/layout') diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml index b244639a4..2e16672e6 100644 --- a/app/layout/layout.phtml +++ b/app/layout/layout.phtml @@ -18,13 +18,7 @@ allow_referrer) { ?> -callbackBeforeContent)) { - call_user_func($this->callbackBeforeContent, $this); - } -?> + -partial('header'); ?> +partial('header'); +?>
- render(); ?> + callbackBeforeFeeds)) { + call_user_func($this->callbackBeforeFeeds, $this); + } + $this->render(); + ?>