Optimize tree building code
| Project: | Menu block |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
Right now, we're just piggy-backing off of menu_tree_all_data() and menu_tree_page_data() to get the tree of links. But then we have to traverse the tree multiple times to trim it and prune it to what we want.
Grabbing the records we need directly from the database would be much more efficient.
Talking with chx on IRC briefly, I can now see how we can use the p* columns in the {menu_links} table to grab a more-specific set of links.
I just need to understand the differences between the guts of menu_tree_all_data() and the guts of menu_tree_page_data(), so I can write a hybrid of them in Menu block.
This will be the basis for the 6.x-3.x releases. Since the Menu block API would change significantly.

#1
Needs tests first: #473984: Add simple tests