Now that menu phase 1 is basically done at http://drupal.org/node/34755 how we proceed?
Phase 2 will see some new fields, mid (for menu id), pid (for parent id), parents (comma separated list ids of all parents), menu_link, task, visible and finally, display_order. menu_link is the aliased and themed menu link. task and visible are flags which tells us what their name suggest. display_order will provide, well the display order, based on vancoding. All this means that one relatively simple query
SELECT menu_link FROM menu WHERE pid IN $parents AND visible = 1 AND task = 0 ORDER BY display_order will be able to select the whole visible tree. $parents will be initialized to the parents of the current menu item and in phase 2 that's it. But in phase 3, as we create the menu tree we will check for expanded items and add them to parents and redo the menu tree. This means some slowdown especially if expanded is used in depth, but I can not care less -- for some time, I thought I will not even do expanded.