Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've got a site with 1200 groups, 1200 OG Menus, and about 32,000 menu items.
node/%node/og_menu/%menu/item/%menu_link/edit
was taking > 30seconds to load and was using somewhere between 512–768M of memory.
The problem was that, even though we know that the given menu item exists in %menu
, menu_edit_item()
loads all 1200 menus to find the one with this menu item.
Patch forthcoming.
Comment | File | Size | Author |
---|---|---|---|
#5 | 2881709-og_menu_edit_item_form-5.patch | 729 bytes | dalin |
#2 | 2881709-menu-ignore_full_menu_tree.patch | 1.3 KB | dalin |
Comments
Comment #2
dalinThis site is on the 2.x branch. We have an upgrade to 3.x planned. I'm guessing that this problem applies to both branches, but I'm not sure.
This includes a patch for the core Menu module. It would be great to get some feedback on this here before adding an issue to Core.
Comment #3
dalinComment #4
dalinComment #5
dalinOops, here's a patch that doesn't include my memory limit hack.
Comment #6
rv0 CreditAttribution: rv0 as a volunteer commentedI don't think there's a big chance for this change to be included in D7 core at this point.
I'm also not sure your solution does not break/lose functionality.
As mentioned in the other issue I still think the best solution is something ajax-y that does all the heavy lifting on demand and replaces the core menu behavior.. This could be handled in contrib and be completely separate from OG Menu.
I'm open to further ideas/suggestions, though my time for this is very limited at this moment.