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 |
Issue fork drupal-2501115
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
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.
Comment #17
catchI think this is probably still valid, linking some related issues. We should re-check how many update queries get run by the router/menu rebuild.