Handling large menus in Drupal

Drupal's menu system can slow down significantly if large numbers of items are in a website's menus. This can become especially serious for administrative users who have additional menus that either are authenticated or that anonymous users don't have. Unchecked, this can use large amounts of memory, leading to timeouts and other navigation problems.

Menu organization is the first and best method of preventing problems. The more compact your menus are, the better they (and Drupal) will perform.

Here are a few Drupal modules that can also help reduce the performance impact of large menus:

  • Big Menu module - Designed specifically for admin menu management, this module loads menu subtrees using AJAX and keeps lower-level menus closed until they're needed.
  • Menuperformance module - This module is more general; it also uses AJAX, both to create its own menu system and to build menus for various pages.
  • Menu position module - This module allows you to create rules for where menu items will automatically be placed upon their creation.

PHP limitations

If the preceding suggestions don't meet your needs, you can increase the PHP value of max_input_vars. For more information, see Maximum input variables.

Contact supportStill need assistance? Contact Acquia Support