This would solve the performance problem in #342632: Performance: DHTML Menu slow on big menu hierarchies and also make Active menus a possible duplicate module per #706514: How is Active menus different than DHTML Menus?.

Comments

aren cambre’s picture

#520170: Use Ajax option in Views conflicts with DHTML Menu refers to some AJAX functionality, but it's unclear if this refers to some new functionality in DHTML Menus. I don't see any options referencing AJAX in my 6.x-3.5 install at admin/settings/dhtml_menu.

matkeane’s picture

Followed your link from #342632: Performance: DHTML Menu slow on big menu hierarchies. Isn't this issue the dupe, rather than that older one which already has some comments?

For large menus, the Active Menu module is a nice option. The reason I ended up not using it on a site with very long/deep menus was that it actually made the menu feel less responsive at the first levels. Because nothing (at least in the version I tested) is preloaded, even opening the first level of the menu meant waiting for the AJAX to load. In the meantime, I think improvements to Jquery's speed seem to have improved the initial build time on the DHTML Menu version... or maybe I've just got used to it.

Anyway, that was just a preamble to say that, yes, AJAX loading would be a nice option, but it needs to be smart and/or configurable. For example, I'd like to see the first level of menu leaves preloaded to improve the speed of initial clicks. After that, maybe the entries for the next level of an opened leaf could be AJAX loaded in the background.

Adding AJAX to DHTML Menu might make the answer to your question in #706514: How is Active menus different than DHTML Menus? less clear. DHTML Menu + simple AJAX would make it Active Menu 2, as well as make the module more complex. Maybe AJAX issues should be targeted at Active Menu instead, with DHTML Menu sticking to the preload approach?

aren cambre’s picture

I marked #342632: Performance: DHTML Menu slow on big menu hierarchies as dupe because the other issue was more of an issue diagnosis. It would be better if there was a "fixed by other issue" status.

I see no reason why DHTML Menus cannot elegantly solve the AJAX/large menu use case. And Active Menus has three negatives:

anarcat’s picture

I don't know Active Menus, but I know that even though DHTML Menu may feel "better" for user interaction, it does impose a significant hit on the database layer, especially for the administration menu. Enabling the module here (instead of admin menu, which caches those menus) adds 80 databases queries (or so) to my query log. On top of 210 queries Drupal already does with other silly things, it adds significant latency to the site.

So either DHTML Menus needs to load this stuff dynamically (through AJAX) or it needs to cache the menus instead of re-rendering them every time (which is the solution used by Admin menus).

felixSchl’s picture

Is this issue still being worked on? I have a menu with around 500 entries and it happens quite a bit that the site does not finish rendering because of the large menu.

vasrush’s picture

I just found a patch for Drupal 7, that adds Ajax functionality to the menu.
http://drupal.org/node/1572340