"Manage > Pages" becomes very slow with hundreds of pages
|Reported by:||MartijnD||Owned by:||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:
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) )
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 ;-)
Change History (21)
- Keywords has-patch added
- Milestone changed from 2.5 to 2.4
- Priority changed from low to normal
- Type changed from task to defect
- Version set to 2.4
comment:14 follow-up: ↓ 17 mihai — 4 years ago
- Cc mihai added
- Milestone changed from 2.5 to 2.8.5
- Resolution fixed deleted
- Status changed from closed to reopened
- Version changed from 2.5 to 2.8.4
comment:17 in reply to: ↑ 14 lloydbudd — 4 years ago
- Milestone changed from 2.8.5 to 2.5
- Resolution set to fixed
- Status changed from reopened to closed
- Version changed from 2.8.4 to 2.5