Prevent and optimize queries related to unindexed posts#23146
Open
leonidasmi wants to merge 4 commits intofeature/misc-performancefrom
Open
Prevent and optimize queries related to unindexed posts#23146leonidasmi wants to merge 4 commits intofeature/misc-performancefrom
leonidasmi wants to merge 4 commits intofeature/misc-performancefrom
Conversation
Coverage Report for CI Build 7Coverage decreased (-0.6%) to 53.026%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
get_total_unindexed()query to be run only once in sites where the SEOO never has run, at the time when we create the relevant notification, but not again.Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
For preventing unnecessary queries:
Enable media pagessetting. That way, we make the site need another round of SEOO.wp transient delete --all) and go to any admin pageWithout this PR:
Yoast\WP\SEO\Actions\Indexing\Abstract_Indexing_Action->get_total_unindexedquery in the query listWith this PR:
Yoast\WP\SEO\Actions\Indexing\Abstract_Indexing_Action->get_total_unindexedquery in the query listFor optimizing queries:
https://plugin-dev.yoastdemo.com/oneYoast->Dashboardand check in Query Monitor the time needed for theYoast\WP\SEO\Actions\Indexing\Abstract_Indexing_Action->get_total_unindexedqueries (the one about the posts should be more optimized)wpseo_total_unindexed_poststransientRegression tests:
get_count_query()change:add_filter( 'Yoast\WP\SEO\enable_cron_indexing', '__return_false' );to disable background indexation, to keep things from changingyoastIndexingDatain the Yoast->Dashboard with this PR and without and confirm you get the same number. Make sure to delete all transients between refreshes.yoastIndexingDatain the Yoast->Dashboard with this PR and without and confirm you get 0 in both cases. Make sure to delete all transients between refreshesget_select_query()change:Relevant test scenarios
Test instructions for QA when the code is in the RC
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.[yoast-doc-extension], added test instructions for Yoast SEO for Google Docs and attached theGoogle Docs Add-onlabel to this PR.Documentation
Quality assurance
grunt build:imagesand commited the results, if my PR introduces new images or SVGs.Innovation
innovationlabel.Fixes #