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.

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

Comments

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

Easy enough.

Status:Needs review» Fixed

Great, very nice.

Status:Fixed» Closed (fixed)

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