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

Only filter final output buffer in Optimization Detective #1317

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from

Conversation

westonruter
Copy link
Member

@westonruter westonruter commented Jun 24, 2024

This is based on @nextend's recommendation in WordPress/gutenberg#61212 (comment) feedback which is drafted in WordPress/gutenberg#62770. If a template calls ob_clean() at present, the output buffer being thrown away will be sent into the output buffer callback for needless processing even though it won't be served. This PR fixes addresses this issue by making sure the output buffer phase is PHP_OUTPUT_HANDLER_FINAL.

@westonruter westonruter added the [Plugin] Optimization Detective Issues for the Optimization Detective plugin label Jun 24, 2024
@westonruter westonruter added the [Type] Enhancement A suggestion for improvement of an existing feature label Aug 6, 2024
@westonruter westonruter changed the title Try considering PHP_OUTPUT_HANDLER_FINAL in output buffer callback Aug 6, 2024
@westonruter westonruter added [Type] Bug An existing feature is broken and removed [Type] Enhancement A suggestion for improvement of an existing feature labels Aug 6, 2024
@westonruter westonruter marked this pull request as ready for review August 6, 2024 00:42
Copy link

github-actions bot commented Aug 6, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: westonruter <westonruter@git.wordpress.org>
Co-authored-by: nextend <nextendweb@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@westonruter westonruter changed the title Only filter final output buffer Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Optimization Detective Issues for the Optimization Detective plugin [Type] Bug An existing feature is broken
2 participants