Hi,
I have a current web project wich contains a 150 websites managing by the module domain. I know what you're already thinking, 150 is way too much but what can i say, it was like this when i resumed this project :)
The main problem i have is with 150 websites, come 150 menus. We have noticed a lot of performance issue on node editing. We have discovered that Drupal is loading the 150x menus and chech the access for each link.
I tried to uncheck each menu per domain in the mass editing page (domain batch) but the settings are not saved. I disabled all the contrib module (in case of a conflic) but the result is still the same.
Any idea or suggestion ?
Thanks for your help
Database : MySQL 5
Php : 5.5
Drupal core version : latest
modules : domain access, domain configuration, domain content
Comment | File | Size | Author |
---|---|---|---|
#7 | 3100688-dmb-form.patch | 2.57 KB | agentrickard |
#3 | Capture d’écran 2019-12-13 à 17.08.54.png | 196.43 KB | Jibus |
Comments
Comment #2
agentrickardThere are two problems here:
Issue #1
This sounds like Domain Menu, which automatically creates menus for each domain. Check to see if that is installed.
The problem here is in the menu count more than the domain count, Menu loading is very expensive.
If the site isn't using Domain Menu, you would need some way to tell core to only load certain menus on a specific domain. That's outside the scope of this module, but I do have some ideas how you could do it.
Try the Domain Menu route first, and then let's see what we have to do.
---
Isssue #2
What do you mean, "I tried to uncheck each menu per domain in the mass editing page (domain batch) but the settings are not saved."?
Is it that they are not saved or that they have no effect?
Can you post some screen shots of that?
Comment #3
Jibus CreditAttribution: Jibus commentedHello Agentrickard,
Thank you for your response.
Issue #1
The website use the domain menu block module. I thought maybe implement a custom module to re-load the menu by setting menu_override_parent_selector to 1, but without success. If you have any suggestions, there're more than welcome :)
Issue #2
Exactly, settings are not saved.
From the batch content type available page. The page is just reloading (without any error / warning message) and all the menus attached to the content type / domain are stillchecked. I tried to disable all the contrib module ( i was thinking of a conflict with an another module) but the result is still the same.
Comment #4
agentrickardI cannot reproduce error #2.
I wonder if it's a form handling issue within PHP and max_input_vars. Because 150 domains x 150 menus would be 22,500 form elements and might cause a silent error. (https://www.php.net/manual/en/info.configuration.php#ini.max-input-vars)
Maybe check your PHP errors logs (and Drupal's watchdog) for some indication of the error.
Comment #5
agentrickardOn issue #1 -- it has been a loooooong time since I looked at Domain Menu Block, but it should be dynamically altering the available menus per domain.
Look in domain_menu_block_init(), which does not seem to be working, since
variable_get('domain_menu_block_content_menu', array())
is returning empty.Comment #6
agentrickardHere's a potential patch for Domain Menu Block.
After installing the patch, go to 'admin/structure/domain/domain_menu_block' and check the 'Preselect menu options when creating nodes' option.
That should only load one menu when editing a node.
Comment #7
agentrickardComment #8
Jibus CreditAttribution: Jibus commentedHi,
Thank you for response.
Applied the patch and notice a huge incresase of performance (1sec loading instead of 30-60sec). Great ! :)
In node edit, one menu is now only loaded (confirmed by devel).
We continue the tests. If it's concluded. Will you push the patch to 7.x brand of Domain Menu Block ?
I still have to check the max_input_vars settings
Comment #9
agentrickardYes. We will move this issue to that queue and spin up a new release.
I think that feature was working at one point, but got lost in a refactor.
Comment #10
Jibus CreditAttribution: Jibus commentedHello,
We push in production and everything is working fine. Thank you again !
I think it's ok now to move this issue to the domain menu block module.
Comment #11
agentrickardMoving to proper queue.
Comment #13
agentrickardCommitted.