Skip to content

Remove some preload / prefetch#2040

Merged
Alkarex merged 5 commits intoFreshRSS:devfrom
Alkarex:no-next-prefetch
Oct 13, 2018
Merged

Remove some preload / prefetch#2040
Alkarex merged 5 commits intoFreshRSS:devfrom
Alkarex:no-next-prefetch

Conversation

@Alkarex
Copy link
Copy Markdown
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
Copy Markdown
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
$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
Copy Markdown
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
Copy Markdown
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
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.

3 participants