Skip to content
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

Merged
merged 5 commits into from
Oct 13, 2018
Merged

Conversation

Alkarex
Copy link
Member

@Alkarex Alkarex commented Oct 7, 2018

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.

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.
@Alkarex Alkarex added this to the 1.12.0 milestone Oct 7, 2018
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.
@Alkarex
Copy link
Member Author

Alkarex commented Oct 7, 2018

Revert a sub-part of #1133

@Alkarex Alkarex changed the title Remove next prefetch Remove some preload / prefetch Oct 7, 2018
@Alkarex Alkarex added the Work in progress 🚧 Wait before merging label Oct 7, 2018
@Alkarex Alkarex removed the Work in progress 🚧 Wait before merging label Oct 7, 2018
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
Copy link
Member

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.

Copy link
Member Author

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)

Alkarex added a commit to Alkarex/FreshRSS that referenced this pull request Oct 13, 2018
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
@Alkarex Alkarex merged commit 1cc891b into FreshRSS:dev Oct 13, 2018
@Alkarex Alkarex deleted the no-next-prefetch branch October 13, 2018 22:35
Alkarex added a commit that referenced this pull request Oct 14, 2018
Alkarex added a commit that referenced this pull request Oct 14, 2018
* 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.
@Alkarex Alkarex mentioned this pull request Oct 14, 2018
javerous pushed a commit to javerous/FreshRSS that referenced this pull request Jan 20, 2020
* 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)
javerous pushed a commit to javerous/FreshRSS that referenced this pull request Jan 20, 2020
* 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.
mdemoss pushed a commit to mdemoss/FreshRSS that referenced this pull request Mar 25, 2021
* 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)
mdemoss pushed a commit to mdemoss/FreshRSS that referenced this pull request Mar 25, 2021
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants