[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 May 23 15:00:48 UTC 2023


#58385: Skip file_exists check for core blocks in register_block_type_from_metadata
--------------------------+----------------------------
 Reporter:  spacedmonkey  |      Owner:  (none)
     Type:  enhancement   |     Status:  new
 Priority:  high          |  Milestone:  Future Release
Component:  Editor        |    Version:
 Severity:  normal        |   Keywords:
  Focuses:  performance   |
--------------------------+----------------------------
 In the `register_block_type_from_metadata` function, there is a call to
 `file_exists` to see if the metadata file existing before registering.
 However, it is extremely unlikely the core blocks would not exist. As file
 lookups are expensive, saving 91 file_exists would improve site
 performance.

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


More information about the wp-trac mailing list