-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Backport from WordPress Core: improve performance of WP_Theme_JSON::merge when merging background styles #66002
Conversation
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
1 similar comment
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
Thanks @ramonjd!
251e889
to
7c59449
Compare
…erge when merging background styles (#66002) Backporting the current state of WordPress/wordpress-develop#7486 and adding tests. Co-authored-by: ramonjd <[email protected]> Co-authored-by: mukeshpanchal27 <[email protected]> Co-authored-by: felixarntz <[email protected]> Co-authored-by: andrewserong < [email protected]> Co-authored-by: joemcgill < [email protected]>
Including variations in the nodes array when 'include_node_paths_only' => true
…erge when merging background styles (WordPress#66002) Backporting the current state of WordPress/wordpress-develop#7486 and adding tests. Co-authored-by: ramonjd <[email protected]> Co-authored-by: mukeshpanchal27 <[email protected]> Co-authored-by: felixarntz <[email protected]> Co-authored-by: andrewserong < [email protected]> Co-authored-by: joemcgill < [email protected]>
…_block_nodes (#66948) Follow up to #66002 Including variations in the nodes array when 'include_node_paths_only' => true Co-authored-by: ramonjd <[email protected]> Co-authored-by: aaronrobertshaw <[email protected]>
…_block_nodes (#66948) Follow up to WordPress/gutenberg#66002 Including variations in the nodes array when 'include_node_paths_only' => true Co-authored-by: ramonjd <[email protected]> Co-authored-by: aaronrobertshaw <[email protected]> Source: WordPress/gutenberg@d0a190b
What?
Follow up to #64128
Backporting from WordPress/wordpress-develop#7486
See: https://core.trac.wordpress.org/ticket/61858
Props to @mukeshpanchal27 @felixarntz @joemcgill @andrewserong
Why?
The original implementation uses
WP_Theme_JSON::get_block_nodes
to fetch the array of style node paths.WP_Theme_JSON::get_block_nodes
calls WP_Theme_JSON::get_blocks_metadata`, which caused a significant performance regression. See: WordPress/performance#1572 (comment)Testing Instructions
See testing instructions in #64128
Also, run the tests!
npm run test:unit:php:base -- --filter WP_Theme_JSON_Gutenberg_Test