-
Notifications
You must be signed in to change notification settings - Fork 805
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
Boost: Reduce unnecessary CSS regenerations #40891
Boost: Reduce unnecessary CSS regenerations #40891
Conversation
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! Boost plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
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.
The changes look good to me. I'll wait until hearing back from Mark on p1736786526455429-slack-C016BBAFHHS
@@ -146,7 +146,7 @@ public function generate_cloud_css( $reason, $providers = array() ) { | |||
|
|||
// Send the request to the Cloud. | |||
$payload = array( 'providers' => $grouped_urls ); | |||
$payload['requestId'] = md5( wp_json_encode( $payload ) . time() ); | |||
$payload['requestId'] = md5( wp_json_encode( $payload ) ); |
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.
Not an objection to this change: We combine all pending critical CSS requests from the same site on the cloud. What do you have in mind with the requestId
?
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.
Having the time() in there generates a new requestId every time. Because the requestId was unique each time, hydra wasn't able to to figure out if the job is in the queue or not (for the deferred jobs primarily).
To make it easier to identify in the cloud, I removed the time()
.
I'm not sure what you mean by "combine all pending critical CSS requests". Maybe we can discuss this sync.
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.
I've reverted the change as it was unnecessary. I was confused. More info here - p1736848836046599-slack-C016BBAFHHS
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.
Looking at this again - why do we even need time()
in the mix? If we're merging requests, does the requestId even matter? Or is it so we can easily identify them for some reason?
Works for me too. |
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.
👍🏼
Proposed changes:
Other information:
Jetpack product discussion
n/a
Does this pull request change what data or activity we track or use?
no
Testing instructions:
This is easier to test with the Boost companion plugin and a local boost cloud instance.