﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
5303	"""Manage > Pages""  becomes very slow with hundreds of pages"	MartijnD	anonymous	"Apologies if this has been mentioned before, I couldn't find a relevant related bug. 

I am currently building a prototype blog / content site that has several hundreds of ""Pages""; and things have slown down a lot. With just over 250 pages, generation of ""Manage > Pages"" takes over 30 seconds, which causes PHP time out errors on the server. 

Some profiling shows that most time is spend in: 

\wp-admin\includes\template.php 
166: function page_rows()

The code for hierarchal display is very inefficient, as it loops over and over the full set of posts to check if a post and a parent are related. 

180:	if ( $hierarchy && ($post->post_parent != $parent) )
181:			continue;

Forcing $hierachy to false reduces the page creation time to 7-8 seconds. Still not great, it should be possible to do this in < 2 seconds. 

Please take this as suggestion for improvement. 

If I have time, I will look into finding a more efficient piece of code -- for now I still have a couple more pages to add ;-)"	defect (bug)	closed	normal	2.5	General	2.5	normal	fixed	has-patch	davidb@… mihai
