Skip to content
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 change from WordPress 6.0. #44290

Closed
wants to merge 1 commit into from
Closed

Conversation

spacedmonkey
Copy link
Member

What?

Backport changes found in #55392

Why?

How?

Testing Instructions

Screenshots or screencast

@spacedmonkey spacedmonkey added the Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core label Sep 20, 2022
@spacedmonkey spacedmonkey self-assigned this Sep 20, 2022
@draganescu
Copy link
Contributor

There is a bit of history here I am leaving for the future:

  1. The initial work was in Improve caching and logic in get_user_data_from_wp_global_styles.
  2. I said it should be moved to the Gutenberg repo (in hopes of getting some 👀 from people close to the code there)
  3. It was moved in Improve cache and performance of get_user_data_from_wp_global_styles
  4. That implementation dragged on for various reasons, lack of reviews and back and forth (this is something of some degree of concern)
  5. With the arrival of the WordPress 6.1 Beta 1 cutoff date Changeset 54186 based on Core 2414 was done, given the performance updates were already getting approval in Trac
  6. @spacedmonkey closed Improve cache and performance of get_user_data_from_wp_global_styles. #42152 and opened Backport change from WordPress 6.0. #44290, this PR.

In the initial #42152 we changed lib/compat/wordpress-6.1/class-wp-theme-json-resolver-6-1.php
Here in #44290 we changed lib/compat/wordpress-6.0/class-wp-theme-json-resolver-6-0.php

#42152 is the correct one because the point was to patch core via the Gutenberg merge for WP 6.1

  • therefore Backport change from WordPress 6.0. #44290 (this PR) does not solve any problem
    • Unless Changeset 54186 is backported to the future WP6.0.x releases
    • Otherwise, core has a better wp-includes/class-wp-theme-json-resolver.php which will be available in WP 6.1
    • If you run Gutenberg now on Core trunk you get the performance improvement.
    • If you run WP 6.0.x OR Gutenberg on top of WP 6.0.x (or less) you don’t get the performance improvement.

I think this is fine and no backporting is needed so we can safely close this.

@draganescu draganescu closed this Sep 20, 2022
@scruffian scruffian deleted the fix/backport-6-0 branch September 20, 2022 11:55
@oandregal
Copy link
Member

oandregal commented Sep 20, 2022

In this case, my main concern for the plugin is not the performance gain but making sure the code in the plugin and the code in core is exactly the same, so backports are trivial and we don't add any regressions in the future.

This is a weird one. It could live in lib/compat/6.0 or lib/compat/6.1. I don't have a strong preference other than we backport the changes to some place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants