Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Drupal\Core\EventSubscriber\MenuRouterRebuildSubscriber::menuLinksRebuild is the Drupal 8 equivalent of _menu_navigation_links_rebuild()
_menu_navigation_links_rebuild() had several optimizations not to re-save save links that hadn't changed, as well as things like #1010480: Optimize _menu_navigation_links_rebuild().
Proposed resolution
Try to add those back.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#3 | Screen Shot 2015-06-06 at 11.13.18 AM.png | 110.26 KB | catch |
Comments
Comment #1
catchComment #2
dawehnerUrgs
Comment #3
catchI think I got this wrong, what I was seeing was the re-saving of the menu tree and updating parent status. if we were resaving menu links it'd be much, much worse.
It may be possible to optimize this though by checking for changes before we write.
Attaching xhprof screenshot that shows where the update queries are coming from.
I also noticed this happens within route rebuilding which I'm not sure is strictly necessary/desirable, opened #2501555: Move menu link rebuilding out of route rebuilding.