[wp-trac] [WordPress Trac] #31182: array_shift in taxonomy.php very slow on large array

WordPress Trac noreply at wordpress.org
Sat Jan 31 00:53:07 UTC 2015


#31182: array_shift in taxonomy.php very slow on large array
--------------------------+------------------
 Reporter:  VolodymyrC    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.2
Component:  Taxonomy      |     Version:  2.7
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------

Comment (by toscho):

 I don’t see why we should change the original array at all. We just have
 to move the pointer, right?

 {{{
 do {
     $term = current ( $terms );
     // add term to new array depending on condition
 } while ( next( $terms );
 }}}

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


More information about the wp-trac mailing list