-
-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove some preload / prefetch #2040
Conversation
This approach was only efficient in the specific case when no change was made (no mark-as-read, favourites, tags), and useless in the other situations. Removed to reduce server load.
While useful for the first request, those preload / prefetch hints are slightly negative for the following requets, especially server-side, e.g. generating one log entry in Apache, and a bit more network traffic.
Revert a sub-part of #1133 |
app/FreshRSS.php
Outdated
@@ -90,7 +90,7 @@ public static function loadStylesAndScripts() { | |||
} | |||
$filetime = @filemtime(PUBLIC_PATH . '/themes/' . $theme_id . '/' . $filename); | |||
$url = '/themes/' . $theme_id . '/' . $filename . '?' . $filetime; | |||
header('Link: <' . Minz_Url::display($url, '', 'root') . '>;rel=preload', false); //HTTP2 | |||
//header('Link: <' . Minz_Url::display($url, '', 'root') . '>;rel=preload', false); //HTTP2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's useless, it's better to remove it completely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in a666cd8
It might be useful associated with a smarter way of guessing whether the client needs it or not (e.g. first request)
The fast flush optimisation done in FreshRSS#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 FreshRSS#2040
* Ensure fast flush of HTTP headers and HTML head The fast flush optimisation done in #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 #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.
* Remove next prefetch This approach was only efficient in the specific case when no change was made (no mark-as-read, favourites, tags), and useless in the other situations. Removed to reduce server load. * Remove next prefetch from JavaScript too * Remove some preload / prefetch While useful for the first request, those preload / prefetch hints are slightly negative for the following requets, especially server-side, e.g. generating one log entry in Apache, and a bit more network traffic. * Revert mistake * Remove comment FreshRSS#2040 (comment)
* Ensure fast flush of HTTP headers and HTML head The fast flush optimisation done in FreshRSS#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 FreshRSS#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.
* Remove next prefetch This approach was only efficient in the specific case when no change was made (no mark-as-read, favourites, tags), and useless in the other situations. Removed to reduce server load. * Remove next prefetch from JavaScript too * Remove some preload / prefetch While useful for the first request, those preload / prefetch hints are slightly negative for the following requets, especially server-side, e.g. generating one log entry in Apache, and a bit more network traffic. * Revert mistake * Remove comment FreshRSS#2040 (comment)
* Ensure fast flush of HTTP headers and HTML head The fast flush optimisation done in FreshRSS#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 FreshRSS#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.
This approach was only efficient in the specific case when no change was made while reading the first page (no mark-as-read, favourites, tags), and useless in the other situations.
Removed to reduce server load.