Problem/Motivation

There are sites that maintain large menu structures with many disabled links. This is in service of other systems to track the site structure, like menu breadcrumbs. When the menu tree is loaded, it will run access checks on all the links found. This can be resource-intensive and take a long time for larger sites with extremely large menu structures. We should exclude the disabled links before loading the menu tree for the off-canvas prerender and horizontal menu block to reduce the number of access checks run against these menu items.

Proposed resolution

Use the onlyEnabledLinks method on the MenuTreeParameters object before passing it to the load method of the menuTree.

Command icon 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

dk-massive created an issue.