Problem/Motivation
system_get_info() calls right into system_rebuild_module_data(), which parses all .info.yml files. And that's slow, even with the apcu file cache that I have applied already. Without it, it's much worse.
We used to have some pretty complicated and arcane caching there, but we removed it, as we no longer needed that function during bootstrap.
However, we still call it on some places, like /admin/people, to group the permission list by module. On a default D8 installation, 50%/200ms is spent in that function on that page.
Proposed resolution
We already have the module list with filename and pathname in the container. Won't hurt much to put the module name in there as well, and then we can offer a method on ModuleHandler that returns it?
Comments
Comment #1
dawehnerThis reminds me a lot of #2281989: Add a fast and simple way to get module name from the module handler
Comment #2
wim leersComment #3
pwolanin commentedYeah, I think this is a dup?
Comment #4
stefan.r commentedI will pick up that other issue and will address this issue there, feel free to reopen if needed.
Comment #5
stefan.r commented