-
Notifications
You must be signed in to change notification settings - Fork 220
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
OCI & LRC optimizations should not be applied, even if available, on SaaS visits #6964
Labels
Milestone
Comments
MathieuLamiot
added
module: Beacon
module: ALR
Issues related to the Automatic Lazy Rendering feature
labels
Sep 10, 2024
6 tasks
@MathieuLamiot the accepted criteria is what's currently happening or maybe I'm missing something here |
Groomingin this method
we can add a logic check before optimization process begin, check if nowprocket && no_optimize && wpr_imagedimensions is set.
Add same logic to add_hashes method here
Estimation[S] PS -- I think we can make the logic a method that can be reused for other sass visit, can't think of any at the moment. |
Looks good to me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Context
As part of #6944, we saw that on SaaS visits (
?nowprocket=1&no_optimize=1&wpr_imagedimensions=1
), LRC and OCI optimizations are applied if possible. This is not needed. We could save some CPU usage on this.This is due to this line:
wp-rocket/inc/Engine/Common/PerformanceHints/Frontend/Subscriber.php
Line 44 in 8b030d3
Instead of running the whole
maybe_apply_optimizations
and therefore, maybe call the optimize methods of the factories, we should only maybe inject the beacon, and bypass the calls to optimize.Expected behavior
On SaaS visits (
?nowprocket=1&no_optimize=1&wpr_imagedimensions=1
):On visits with
wpr_lazyrendercontent
and not wpr_imagedimensions, the beacon must not be injected (already the case) and the LRC hashes must be added (already the case).Acceptance Criteria
On a page with no data stored in DB for OCI/LRC:
On a page with data stored in DB for OCI/LRC:
The text was updated successfully, but these errors were encountered: