-
Notifications
You must be signed in to change notification settings - Fork 215
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
Preload adaptative batch #6427
Preload adaptative batch #6427
Conversation
…ious batch and errors
Conservative approach by initializing batch size to min value Check duration once per batch for the average Remove unused transient Remove transient on uninstall
…g actions as develop
…e/preload-adaptative-batch
/** | ||
* Filter the delay between each preload request. | ||
* | ||
* @param float $delay_between the defined delay. | ||
* @returns float | ||
*/ | ||
$delay_between = apply_filters( 'rocket_preload_delay_between_requests', 500000 ); |
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 know it's not been added by this PR, but shouldn't we add a safeguard here ?
@wp-media/qa-team To test this issue:
Cloudways We can also check CPU usage on rocketlabs (WordOps) for gamma for instance.It would be great if you could explore a bit how this behaves with an "heavy" website: typically gamma, might want to duplicate it with Duplicator for instance? ; Another approach could be to add some CPU intensive computation in the initialization of WP or of WP Rocket to make as if the website was slow. |
…atch # Conflicts: # inc/Engine/WPRocketUninstall.php
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.
Related TP execution Results below:
testrail-report-613.pdf
Description
When preparing preload batches, the batch size will be adapted based on the average duration of a request to avoid flooding servers with requests if they take too long.
To get the estimate of the request duration, we do a blocking request from time to time when triggering the preload, and measure the timing.
Fixes #6396
Type of change
Please delete options that are not relevant.
Is the solution different from the one proposed during the grooming?
Yes, on top of the original idea, we added an average mechanism that keeps track of the average request time through transients.
Checklists
Generic development checklist
Test summary
Tested locally and on the gamma website by checking transients and scheduled actions.