[wp-trac] [WordPress Trac] #59969: Conditional loading `build_template_part_block_variations` for performance improvement
WordPress Trac
noreply at wordpress.org
Mon Jan 8 07:52:54 UTC 2024
#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 gaambo):
For [https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-
includes/class-wp-block-styles-registry.php block styles],
[https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes
/class-wp-block-patterns-registry.php patterns] and
[https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes
/class-wp-block-pattern-categories-registry.php pattern categories] a
registry is used. I know these are kind of different, because block styles
can be registered outside from register_block_type, but that might be
interesting for variations in the future as well. Also variations are kind
of "bound" more to a single block type.
So maybe that approach - to use a singleton registry - could work for
variations as well? That does not necessarily solve the performance aspect
of this issue, but wanted to give it as an input for the architecture.
It's my understanding, that the original issue is a performance issue but
we're getting into API design territory here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59969#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list