[wp-trac] [WordPress Trac] #10852: improve get_page_children

WordPress Trac wp-trac at lists.automattic.com
Mon Sep 28 16:05:40 UTC 2009


#10852: improve get_page_children
--------------------------+-------------------------------------------------
 Reporter:  hailin        |       Owner:  westi    
     Type:  enhancement   |      Status:  reviewing
 Priority:  normal        |   Milestone:  2.9      
Component:  Optimization  |     Version:  2.9      
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------

Comment(by hailin):

 westi:

    The test case was realy simple - I just constructed a nested page tree
 with about 100 nodes. And put

 $t1 = microtime(true);
 get_page_children( $id ); //adjust your id here
 $t2 = microtime(true);

 $t = $t2 - $t1;
 echo $t

 You can see significant performance gain even with ~ 20 nested nodes.

 I heard two recent GoSOC students did MPTT, and core devs are thinking
 about using MPTT to rearrange all these nested data structures. If it
 happens, all these functions and algorithms will be replaced eventually. I
 can still try to find some time to write unit test repo, if I can free up
 my hands in the near future.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10852#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list