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.

Comments

dalin created an issue. See original summary.

dalin’s picture

This 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.

dalin’s picture

dalin’s picture

Assigned: dalin » Unassigned
dalin’s picture

StatusFileSize
new729 bytes

Oops, here's a patch that doesn't include my memory limit hack.

rv0’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Category: Bug report » Feature request
Priority: Major » Normal

I 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.

joelpittet’s picture

Status: Active » Closed (outdated)

Drupal 7 reached end-of-life and the D7 version of Organic Groups Menu is no longer being developed. To keep the issue queue focused on supported versions, we’re closing older D7 issues. If you still have questions about using Organic Groups Menus on Drupal 7, feel free to ask. While we won’t fix D7 bugs anymore, we’re happy to offer guidance to help you move forward. You can do so by opening (or reopening) a D7 issue, or by reaching out in the #og channel on Drupal Slack.

If this issue is still relevant for Drupal 10+, please open a follow-up issue or merge request with proposed changes. Contributions are always welcome! 💙

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.