[wp-trac] [WordPress Trac] #59969: Conditional loading `build_template_part_block_variations` for performance improvement

WordPress Trac noreply at wordpress.org
Mon Dec 18 19:16:47 UTC 2023


#59969: Conditional loading `build_template_part_block_variations` for performance
improvement
-------------------------------------------------+-------------------------
 Reporter:  thekt12                              |       Owner:  thekt12
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.5
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch 2nd-opinion needs-unit-    |     Focuses:
  tests                                          |  performance
-------------------------------------------------+-------------------------

Comment (by joemcgill):

 Replying to [comment:13 gaambo]:

 > In #59906 (based on https://github.com/WordPress/gutenberg/pull/54801,
 https://github.com/WordPress/gutenberg/pull/56100 and
 https://github.com/WordPress/gutenberg/pull/56080) I added variations for
 the post-term and navigation link block. Both were mentioned in comment:11
 >
 > Should we create/register these variations conditionally (eg only on
 admin) as well? I see the current PR in this ticket still works with the
 code currently in core, which does not have the additional code from my
 GitHub PRs where additional variations are created on post-type/taxonomy
 registration.

 Thanks for the heads up, @gaambo. I think we'll need to keep these types
 of changes in mind when implementing any changes to the way variations can
 be registered. The problem that you were solving for — adding additional
 variations after the block is initially registered — could also be solved
 by creating the variations when they are consumed, rather than than when
 the block is initially registered.

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


More information about the wp-trac mailing list