[wp-trac] [WordPress Trac] #59181: Performance optimization of register_block_script_handle()

WordPress Trac noreply at wordpress.org
Thu Aug 24 19:36:31 UTC 2023


#59181: Performance optimization of register_block_script_handle()
-------------------------------------------------+-------------------------
 Reporter:  mukesh27                             |       Owner:  antpb
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Editor                               |     Version:  5.5
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-screenshots good-first-bug has-  |     Focuses:
  patch reporter-feedback commit                 |  performance
-------------------------------------------------+-------------------------
Changes (by antpb):

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


Comment:

 In [changeset:"56455" 56455]:
 {{{
 #!CommitTicketReference repository="" revision="56455"
 Performance: Add fallback for `$script_uri` to prevent firing
 `plugins_url()` unnecessarily.

 Previously, in `register_block_script_handle()` the `$script_uri` variable
 initialized with a `plugins_url()` call that was reported to invoke four
 times. In this patch the var is initialized as a blank string with a
 fallback to use the `plugins_url()` if the other intended conditions are
 not met.

 Props mukesh27, daxelrod, adamsilverstein, davidbaumwald.
 Fixes #59181.
 }}}

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


More information about the wp-trac mailing list