[wp-trac] [WordPress Trac] #55005: Improve PHP performance for block.json files

WordPress Trac noreply at wordpress.org
Wed Sep 21 13:59:06 UTC 2022


#55005: Improve PHP performance for block.json files
-------------------------------------------------+-------------------------
 Reporter:  aristath                             |       Owner:
                                                 |  hellofromTonya
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.1
Component:  Editor                               |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch needs-testing needs-unit-  |     Focuses:
  tests                                          |  performance
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):

 * status:  assigned => closed
 * resolution:   => fixed
 * milestone:  Future Release => 6.1


Comment:

 In [changeset:"54276" 54276]:
 {{{
 #!CommitTicketReference repository="" revision="54276"
 Editor: Improve block loading PHP performance.

 This commit improves PHP performance for core blocks by reading a single
 PHP file with block metadata, instead of reading a JSON file per-block and
 then decoding from JSON to PHP.

 Includes:
 * Adding a new Grunt task to convert `block.json` files to `block-
 json.php`.
 * Using the new `block-json.php` file in the
 `register_block_type_from_metadata()` function.

 Follow-up to [48141].

 Props aristath, gziolo, johnbillion, presstoke, mukesh27, hellofromTonya,
 petitphp, adamsilverstein, costdev, desrosj, SergeyBiryukov.
 Fixes #55005.
 }}}

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


More information about the wp-trac mailing list