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?

Remaining tasks

User interface changes

API changes

Comments

dawehner’s picture

wim leers’s picture

pwolanin’s picture

Yeah, I think this is a dup?

stefan.r’s picture

Status: Active » Closed (duplicate)

I will pick up that other issue and will address this issue there, feel free to reopen if needed.

stefan.r’s picture

Title: system_get_list('module') is the only way to get module names and it is very slow » system_get_info('module') is the only way to get module names and it is very slow