This proposal is about coding and testing of an idea from a WordPress developer.
The idea is to implement MPTT (Modified Preorder Tree Traversal) technique, that consists in storing hierarchical data (trees) in relational databases.

This is meant to be included in the core of WordPress to get better performance in blogs with many categories and pages.

For this, I will code the general algorithm (insertion, editing, deleting) for making performance tests. In particular:

  • Create an MPTT_Walker class with the same API as Walker.
  • Add MPTT fields to taxonomy tables.
  • Convert Category_Walker to use MPTT_Walker
  • Profile read and write performance to see how well MPTT behaves.

If I finish earlier than planned, I could make an utility to take advantage of MPTT (on admin interface, i.e.: ajax interface to manage categories and pages).

I wrote about this idea in wp-hackers list, more info about it in http://comox.textdrive.com/pipermail/wp-hackers/2009-March/025500.html .
Schedule of Deliverables

Basically I must modify the database in order to use the MPTT structure and then build a MPTT_Walker class that uses the new structure. Then it is necessary to code the categories_walker class using MPTT_Walker. In addition, it is necessary to evaluate the behavior of the new algorithm doing “profiling”, to know if really there is an improvement.

The deliverables of the proyect are:

  • Database modifications
  • MPTT_Walker class
  • Category_Walker and Page_Walker

The delivery schedule is as follows:

  • June 1st: database modifications
  • June 22nd: MPTT_Walker class
  • July 6th: Category_Walker class
  • July 20nd: Results of Category_Walker class
  • July 27nd: Page_Walker class
  • August 3th: Results of Page_Walker profiling