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

WordPress Trac noreply at wordpress.org
Sun Feb 22 13:33:05 UTC 2015


#10852: improve get_page_children
-------------------------------------------------+-------------------------
 Reporter:  hailin                               |       Owner:  westi
     Type:  enhancement                          |      Status:  reviewing
 Priority:  normal                               |   Milestone:  Future
Component:  Posts, Post Types                    |  Release
 Severity:  normal                               |     Version:  2.9
 Keywords:  has-patch dev-feedback needs-unit-   |  Resolution:
  tests                                          |     Focuses:
                                                 |  performance
-------------------------------------------------+-------------------------

Comment (by santagada):

 Looking at code from get_page_hierarchy I tightened the code a bit
 (get_page_hierarchy could be updated to not be recursive which is very
 slow in the common php vm) and updated the description of the function to
 point out it is also O(n) now.

 Any ideas how should I test this code? I'm thinking of adding tests to
 tests/post/getPageChildren.php, does that seem ok?

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


More information about the wp-trac mailing list