We encounter this problem a lot: the extremely popular and oft-used Admin Menu module causes performance problems.

Here is an example from a site we recently did a Drupal performance assessment for.

Executed 3,169 queries in 584.11 milliseconds.
Page execution time was 4,330.86 ms.

As you can see, the number of queries per request is horrendous, and the site is a resource hog if left in that state.

There were several reasons that were causing excessive number of queries leading to excessive page load time, and general slowness and resource usage.

The key here is that the context module was doing a cache_set() and that was triggering Admin Menu to rebuild its menus.

We diagnosed the problem, and were able to get over it by disabling the following modules:

  • ND Context
  • Context Layout
  • Context UI
  • Context
  • Admin Menu

After disabling the above modules, we were able to get much better response and far less queries, after we did that, as follows:

Executed 245 queries in 59.41 milliseconds.
Page execution time was 866.24 ms.

Orders of magnitude better ...

We are told, but have not verified, that the 3.x branch is supposed to fix some of the performance issues of Admin Menu.

Comments

Wed, 2012/12/12 - 05:13

Good for the diagnose, but the solution is quite drastic. Shouldn't be enough to disable Context.
Any other solution?

Wed, 2012/12/12 - 05:59

We've seen it slow on sites without context as well, but in this case we captured figures before/after for it.

The issue(s) probably exhibit themselves when a site has a large menu structure regardless of the underlying cause for it.

Wed, 2012/12/12 - 06:22

This is not quite a solution if you intent to use Context.
Disabling admin menu isn't convienient too.

I have Admin menu, Context and Context UI enabled, and here is what Devel says : "Executed 449 queries in 420.97 ms"

Wed, 2012/12/12 - 08:18

May be related to this: http://drupal.org/node/873936#comment-4381044

Wed, 2012/12/12 - 08:31

Hi,

I've ran into the same issues in the past. There are performance patches for context UI that help quite a lot:

http://drupal.org/node/873936#comment-5624148 - Context UI Editor - menu speed up
http://drupal.org/node/1540292#comment-5893692 - Context UI markup with slow _get_region call run if user does not even have permission to edit
contexts

Wed, 2012/12/12 - 08:36

I generally use admin menu for user 1 only (have it enabled but give no roles the permission).

That way I can use admin menu for site building tasks but lower down admins get the normal drupal toolbar.
Then I just have a little snippet of code so the regular toolbar doesn't appear for user 1.

In theory this should mean the overhead of admin menu is not experienced by regular users (I assume admin menu wouldn't be doing anything without perms, but have not actually investigated), who usually don't need to complexity of admin menu (and don't have access to most of what it holds).

Wed, 2012/12/12 - 08:55

This is only an issue for authenticated users who have permission to see the administration menu, right?

Thu, 2012/12/13 - 11:44

The site had only one user who was creating content and the site was very slow for her, and a resource hog as well for the server. Once we removed those modules, everything was fast.

Wed, 2012/12/12 - 08:57

Hi thanks for the sharing.
Can you please tell me which tools or software do you use in testing or memory or how do you perform it.

Wed, 2012/12/12 - 23:46

Generally to diagnose memory issues Devel module is used

Wed, 2012/12/12 - 10:14

Could it be this issue?

http://drupal.org/node/457384

Eric

The context module isnt very performant when you have a large sets of contexts. It has to loop through all its context to see if anything has to be triggered. Better is page manager which just reacts to the path and has a far powerful context system.

Is your Drupal or Backdrop CMS site slow?
Is it suffering from server resources shortages?
Is it experiencing outages?
Contact us for Drupal or Backdrop CMS Performance Optimization and Tuning Consulting