[wp-trac] [WordPress Trac] #19285: Hierachical post types don't scale well - memory usage

WordPress Trac wp-trac at lists.automattic.com
Fri Nov 18 07:21:40 UTC 2011


#19285: Hierachical post types don't scale well - memory usage
--------------------------+-----------------------------
 Reporter:  maxaud        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Post Types    |    Version:  3.2.1
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 I recently created a custom post type that was hierarchical and was using
 it for data integration. I brought in 31,000 posts in the first 30 days
 and each post had a parent page set*. The page ran out of memory (256mb)
 when the post type was hierarchical. I set to false and it started to show
 again.

 This looks to be the suspected area of holdup:
 /wp-admin/includes/post.php - Line 884
 {{{
  // Hierarchical types require special args.
  if ( is_post_type_hierarchical( $post_type ) && !isset($orderby) ) {
    $query['orderby'] = 'menu_order title';
    $query['order'] = 'asc';
    $query['posts_per_page'] = -1;
    $query['posts_per_archive_page'] = -1;
  }
 }}}

 *This is a multisite install and it may be important to note that the
 parent of the posts is a post of a different post_type.

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


More information about the wp-trac mailing list