[wp-trac] [WordPress Trac] #32144: get_terms with child_of

WordPress Trac noreply at wordpress.org
Wed May 6 16:18:15 UTC 2015


#32144: get_terms with child_of
--------------------------+---------------------------
 Reporter:  shifty51      |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.2.2
Component:  Taxonomy      |     Version:  4.2
 Severity:  normal        |  Resolution:  fixed
 Keywords:  fixed-major   |     Focuses:  performance
--------------------------+---------------------------
Changes (by boonebgorges):

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


Comment:

 In [changeset:"32383"]:
 {{{
 #!CommitTicketReference repository="" revision="32383"
 Improve performance of loop detection in `_get_term_children()`.

  Using an array keyed by term_id allows us to use `isset()` rather than
 the
  slower `in_array()`. In addition, it lets us avoid the use of
 `wp_list_pluck()`
  on large arrays, and helps us to avoid arrays that are unnecessarily
 large due
  to duplicate entries.

  Fixes #32144 for 4.2 branch.
 }}}

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


More information about the wp-trac mailing list