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

WordPress Trac wp-trac at lists.automattic.com
Thu Nov 18 00:33:16 UTC 2010


#15459: Need Better Page Hierarchy Display Algo
--------------------------+-------------------------------------------------
 Reporter:  truthmedia    |       Owner:                          
     Type:  defect (bug)  |      Status:  new                     
 Priority:  normal        |   Milestone:  Awaiting Review         
Component:  Performance   |     Version:  3.0.1                   
 Severity:  normal        |    Keywords:  memory, pages, hierarchy
--------------------------+-------------------------------------------------
 WordPress 3.0.1

 File: /wp-admin/includes/post.php

 Lines: 904-912

 Code:
 {{{
         // Hierarchical types require special args.
         if ( is_post_type_hierarchical( $post_type ) ) {
                 $query['orderby'] = 'menu_order title';
                 $query['order'] = 'asc';
                 $query['posts_per_page'] = -1;
                 $query['posts_per_archive_page'] = -1;
         }

         wp( $query );
 }}}

 The code in the area mentioned above causes our site to use over 170mb of
 memory on each load of the Pages index.  This really should be improved to
 accommodate sites that have large amounts of hierarchical data.  Looks to
 me like it's pulling all the data for all the pages on the site.  Perhaps
 a solution where unnecessary data is not included might be better here
 (such as content or excerpt).

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


More information about the wp-trac mailing list