Improve performance of link building#20380
Merged
enricobattocchi merged 14 commits intotrunkfrom Sep 19, 2023
Merged
Conversation
Pull Request Test Coverage Report for Build 6012531214
💛 - Coveralls |
…hen that's not possible
…ge to keep all solutions working the same
…ost-with-yoast-enabled-is-terribly-slow
17 tasks
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.
Do not merge after CR + ACC.
Context
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
WP_HTML_Tag_Processorclass is being used to retrieve and store image IDs in our SEO_Links tableDOMDocumentclass for that.get_attachment_by_url()method.wpseo_force_creating_and_using_attachment_indexablesTest instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
The setup.
alotof media items in your installation. To do this do the followingwp-active.phpandwp-config.php150.pngis the filename of the image so make sure that is the same for you./wp-admin/admin.php?page=wpseo_page_settings#/media-pagesnoimage indexables are made by running the following query:SELECT * FROM wp_yoast_indexables where object_sub_type='attachment';Do the following on WordPress 6.2+ this is needed for the
WP_HTML_Tag_ProcessorIn the block editor:
noimage indexables are made by running the following query:SELECT * FROM wp_yoast_indexables where object_sub_type='attachment';In the classic editor:
add mediawith an image to a new post.noimage indexables are made by running the following query:SELECT * FROM wp_yoast_indexables where object_sub_type='attachment';In Elementor:
noimage indexables are made by running the following query:SELECT * FROM wp_yoast_indexables where object_sub_type='attachment';Remember these posts and downgrade to WordPress 6.1 or lower.
Upgrade back to 6.2 and add the following filters:
To make sure this improves the performance over the other two in certain situations do the following:
Enable the classic editor and add a gallery with lots (50+) images to a new post and save without this pr. Take note of the saving time.
Enable the PR and make sure you indexables are fully indexed.
Save again and make sure the performance is better.
Add a new image via the image library /wp-admin/media-new.php and make sure an indexable is created for this image.
Force ignore all changes filter
\add_filter(‘wpseo_force_skip_image_content_parsing’, ‘__return_true’ );Test filters to allow different gallery plugins
Relevant test scenarios
Test instructions for QA when the code is in the RC
QA can test this PR by following these steps:
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
UI changes
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.Documentation
Quality assurance
Innovation
innovationlabel and noted the work hours.Fixes #16713