Opened 13 years ago
Closed 13 years ago
#19285 closed defect (bug) (duplicate)
Hierachical post types don't scale well - memory usage
Reported by: | maxaud | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.2.1 |
Component: | Posts, Post Types | Keywords: | |
Focuses: | Cc: |
Description
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.
Change History (2)
Note: See
TracTickets for help on using
tickets.
The page that ran out of memory was
http://domain.com/wp-admin/edit.php?post_type=the_post_type
(When you click to view the posts in the backend.)