[wp-trac] [WordPress Trac] #31411: Make get_page_children much faster

WordPress Trac noreply at wordpress.org
Sun Feb 22 01:34:06 UTC 2015


#31411: Make get_page_children much faster
-------------------------------+-----------------------------
 Reporter:  santagada          |      Owner:
     Type:  enhancement        |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  trunk
 Severity:  normal             |   Keywords:
  Focuses:  performance        |
-------------------------------+-----------------------------
 This patch changes the algorithm get_page_children uses to a faster one.
 This old algo is both recursive (so at most depth 100 on common php vm)
 and exponential in time. The one proposed on the patch is linear and
 doesn’t use recursion, which is faster and doesn’t impose a theoretical
 limit on three depth.

 Another idea is to rename the function to get_post_children as any custom
 post_type can be hierarchical, not only pages.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31411>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list