I have two observations: 1. The perfor…

I have two observations:

1. The performance comparison tests should be conducted on larger # of nested page nodes. Currently, I only see it’s done on 1800 pages. We’ve seen the performance bottleneck gotten worse when there are 5000 – 10,000 pages.

In the case of 5000 pages, I did one test, and it revealed that the bottleneck was actually not the algorithm itself – it’s because the old algorithm returns ALL pages, and for every page, we did expensive update_post_caches(), and apply_filters(‘the_posts’, $this->posts).
Ex: for total of about 60 seconds – 17 seconds are spent in update_post_caches(), and 11 seconds are spent in apply_filters(‘the_posts’, $this->posts)

With MPTT, the # of returned pages will be much smaller, so conceivably, the saving would be great. It would be nice to identify those bottlenecks, and make sure the new MPTT addresses those bottlenecks.

2. I did a little bit more optimization on existing algorithm.
http://core.trac.wordpress.org/ticket/10852 and http://core.trac.wordpress.org/ticket/10853.
It’d be interesting to compare the performance again with those two changes.