[wp-trac] [WordPress Trac] #46469: wp_script_is() is super slow

WordPress Trac noreply at wordpress.org
Tue Feb 25 13:41:06 UTC 2020


#46469: wp_script_is() is super slow
-------------------------------------------------+-------------------------
 Reporter:  superdav42                           |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  5.4
Component:  Script Loader                        |     Version:  5.0
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch dev-feedback early needs-  |     Focuses:
  testing                                        |  performance
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"47359" 47359]:
 {{{
 #!CommitTicketReference repository="" revision="47359"
 Script Loader: Improve performance of `wp_script_is()` for scripts
 registered with complex dependencies.

 This switches `WP_Dependencies::recurse_deps()` from recursively checking
 the same handles over and over again to keep a flattened array of queued
 items and their dependencies for faster lookup in
 `WP_Dependencies::query()`.

 Props superdav42.
 Fixes #46469.
 }}}

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


More information about the wp-trac mailing list