[wp-hackers] WP Memory usage

Mark Jaquith mark.wordpress at txfx.net
Wed May 31 00:23:51 GMT 2006

On May 30, 2006, at 4:45 PM, Shane Brady wrote:

> I've noted that on the edit-pages.php page, with 300 pages, that  
> the memory
> limit is exceed almost all the time.  In addition, the page is  
> horribly
> slow, and I'm not sure why, since I can run the queries manually,  
> and they
> return fast.

This is a problem on par with the users page... maybe even worse,  
because there are more sites with hundreds of pages than there are  
sites with hundreds of users.  The pages one is difficult, in that we  
can't just do simple paging... because we have tree structure to keep  

One solution (assume 5 WP pages per management page... it would  
obviously be much higher in reality):

===(page 1 of 2)===
- Top Level Page 1
---- Subpage 1A
---- Subpage 1B
---- Subpage 1C
---- Subpage 1D

===(page 2 of 2)===
- Top Level Page 1
---- Subpage 1E
- Top Level Page 2
---- Subpage 2A
---- Subpage 2B

As you can imagine, it gets tricker when you have to handle deeper  
depths of pages.

Another solution is to do a tree structure but only show one level at  
a time.

- Top Level Page 1
- Top Level Page 2
- Top Level Page 3

Clicking any page gets you a display with that page and its immediate  
children.  Clicking its children gets the child as the parent, with  
any grandchild pages shown as children.  Then, if you need to do  
paging, you do it within that group of immediate children.

- Top Level Page 2
---- Subpage 2A
---- Subpage 2B
---- Subpage 2C

You'd need search functionality too.

On May 30, 2006, at 8:15 PM, Robert Deaton wrote:
> I still disagree with the idea of using plugins to fix a severe
> problem like this, where a fix should be in the core and the
> additional functionality of grabbing more fields could be done by
> plugin.

Agreed.  We can't write off these edge cases, whereby core  
functionality is hindered.  From a PR standpoint (which isn't the POV  
most of us have, this is just in addition to the "because we can make  
it better" argument), these edge cases with 1000s of users or  
hundreds of pages may well act as the shining examples of WordPress  
as a serious engine for specific CMS needs.  We could have a big  
company display a big tree of its products and product categories via  
WordPress pages or have a school give every student a commenting or  
posting account on a school news blog.

Mark Jaquith

More information about the wp-hackers mailing list