Problem/Motivation
Drupal\Core\Theme\ComponentNegotiator::negotiate
Doing some profiling of Drupal CMS and I see a lot of memory usage from this method.
Seems to all be due to Drupal\Core\Extension\ExtensionList::getList which is called by Drupal\Core\Theme\ComponentNegotiator::maybeNegotiateByModule
I think the component negotiator probably needs its own cache so it doesn't need to load the full info for every module into memory on every request - but didn't read code yet.
This is also called by Drupal\Core\Extension\ThemeHandler::listInfo
Steps to reproduce
N/A
Proposed resolution
Refactor the ComponentNegotiator::negotiate method to make it less of a memory hog.
Remaining tasks
None
User interface changes
None
Introduced terminology
None
API changes
None
Data model changes
None
Release notes snippet
None