Problem/Motivation
ModuleInstaller currently loops over every module and calls invoke for each hook, so this tries invoking hooks on modules that have not implemented them.
This in turn calls legacyInvoke which is not performant.
It is better to call invokeAll and let ModuleHandler do the work. This is more performant and more future proof.
Steps to reproduce
N/A
Proposed resolution
Change from a foreach loop to modulehander invokeall
Remaining tasks
N/A
User interface changes
N/A
Introduced terminology
N/A
API changes
N/A
Data model changes
N/A
Release notes snippet
N/A
Issue fork drupal-3486995
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3486995-clean-up-how
changes, plain diff MR !10154
Comments
Comment #3
nicxvan commentedCredit
Comment #4
nicxvan commentedComment #5
nicxvan commentedComment #6
nicxvan commentedComment #7
smustgrave commentedSeems like a straight forward
Comment #10
larowlancommitted to 11.x and backported to 11.1.x - thanks!