[wp-trac] [WordPress Trac] #58385: Skip file_exists check for core blocks in register_block_type_from_metadata

WordPress Trac noreply at wordpress.org
Tue Jun 13 11:44:31 UTC 2023


#58385: Skip file_exists check for core blocks in register_block_type_from_metadata
--------------------------+-----------------------------
 Reporter:  spacedmonkey  |       Owner:  spacedmonkey
     Type:  enhancement   |      Status:  closed
 Priority:  high          |   Milestone:  Future Release
Component:  Editor        |     Version:
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:  performance
--------------------------+-----------------------------
Changes (by spacedmonkey):

 * owner:  (none) => spacedmonkey
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55910" 55910]:
 {{{
 #!CommitTicketReference repository="" revision="55910"
 Editor: Skip file_exist check for core blocks.

 In `register_block_type_from_metadata` function, skip calling
 `file_exists` on core blocks. Core blocks are part of the codebase and
 will never not exist. Not calling this function is better for performance,
 as the file lookup can be expensive.

 Props spacedmonkey, joemcgill.
 Fixes #58385.
 }}}

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


More information about the wp-trac mailing list