Title says it all. menu_rebuild() rebuilds the menu immediately. variable_set('menu_rebuild_needed', TRUE) schedules the rebuild for the next page load.
This means that even if you call menu rebuilding code 10 times, the variable_set way will ensure it's not rebuilt more than needed (which is once).

This improves install performance, where we frequently had menu rebuilds happening multiple times for no good reason.

#1 1574746-smarter-menu-rebuild.patch2.22 KBbojanz
PASSED: [[SimpleTest]]: [MySQL] 3,567 pass(es). View


bojanz’s picture

Status:Active» Needs review
2.22 KB
PASSED: [[SimpleTest]]: [MySQL] 3,567 pass(es). View

Easy enough.

rszrama’s picture

Status:Needs review» Fixed

Great, very nice.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.