EntityRouteContext::getAvailableContexts doesn't need to call EntityRouteContextRouteHelper::getAllRouteNames

Created on 4 July 2023, over 1 year ago
Updated 26 June 2024, 5 months ago

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.

📌 Task
Status

Fixed

Version

4.0

Component

Code

Created by

🇦🇺Australia acbramley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024