Problem/Motivation

While profiling a hefty admin screen, I noticed that the array_map callback in EntityRouteContextRouteHelper::getAllRouteNames() was being called over 120k times.

Tracing this to EntityRouteContext::getAvailableContexts, this function is only used to get entity type ids. We instead use $this->entityTypeManager->getDefinitions(), simplifying the calls below it.

Command icon 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:

Comments

acbramley created an issue. See original summary.

acbramley’s picture

Status: Active » Needs review

This dropped it off the profile entirely.

dpi made their first commit to this issue’s fork.

dpi’s picture

  • dpi committed aa8d5beb on 4.x authored by acbramley
    Issue #3372116 by acbramley: EntityRouteContext::getAvailableContexts...
mstrelan’s picture

Status: Needs review » Fixed

Looks like this is fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.