[wp-trac] [WordPress Trac] #15459: Need Better Page Hierarchy Display Algo

WordPress Trac wp-trac at lists.automattic.com
Mon May 7 19:01:09 UTC 2012


#15459: Need Better Page Hierarchy Display Algo
-------------------------+-----------------------------
 Reporter:  truthmedia   |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Performance  |     Version:  3.0.1
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |
-------------------------+-----------------------------

Comment (by nacin):

 Here's a quick patch that breaks all over the place but could be a good
 starting point for someone wishing to solve this.

 Essentially, here's what we currently do:
  * Query all posts
  * Group them based on ID and post_parent
  * Begin rendering posts until we've reached the total to display per page

 What we should do instead:
  * Query all IDs and post parents
  * Group them
  * Figure out what posts we need to grab to display the right number on a
 page
  * Use _prime_post_caches() to pull those specific posts into cache
  * Render those posts

 Querying all IDs and parents still isn't ideal, but it's a step in the
 right direction. Without MPTT this is not easy.

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


More information about the wp-trac mailing list