[wp-trac] [WordPress Trac] #56467: Update @wordpress packages and backport changes from Gutenberg plugin into Core

WordPress Trac noreply at wordpress.org
Tue Oct 11 17:15:25 UTC 2022


#56467: Update @wordpress packages and backport changes from Gutenberg plugin into
Core
--------------------------------------+------------------------------
 Reporter:  Bernhard Reiter           |       Owner:  Bernhard Reiter
     Type:  task (blessed)            |      Status:  assigned
 Priority:  normal                    |   Milestone:  6.1
Component:  Editor                    |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------

Comment (by hellofromTonya):

 In [changeset:"54493" 54493]:
 {{{
 #!CommitTicketReference repository="" revision="54493"
 Editor: Fix performance regression in WP_Theme_JSON_Resolver.

 A significant performance regression was added late in WP 6.1 beta cycle
 when some of the existing caching for `theme.json` processing was removed.
 The rationale for removing the caching was this code was now used before
 all the blocks are registered (aka get template data, etc.) and resulted
 in stale cache that created issues (see
 [https://github.com/WordPress/gutenberg/issues/44434 Gutenberg Issue
 44434] and [https://github.com/WordPress/gutenberg/issues/44619 Gutenberg
 Issue 44619]). The changes were limited to only reads from the file
 system. However, it introduced a big impact in performance.

 This commit adds caching and checks for blocks with different origins.
 How? It add caching for the calculated data for core, theme, and user
 based on the blocks that are registered. If the blocks haven't changed
 since the last time they were calculated for the origin, the cached data
 is returned. Otherwise, the data is recalculated and cached.

 Essentially, this brings back the previous cache, but refreshing it when
 the blocks change.

 It partially adds unit tests for these changes. Additional tests will be
 added.

 References:
 * [https://github.com/WordPress/gutenberg/issues/44772 Performance
 regression in WP 6.1 for theme.json processing]

 Follow-up to [54251], [54399].

 Props aristath, oandregal, bernhard-reiter, spacedmonkey, hellofromTonya.
 See #56467.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56467#comment:341>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list