RecipeConfigurator::getIncludedRecipe() should statically cache recipe objects to avoid performance problems

Created on 18 November 2024, about 1 month ago

Problem/Motivation

\Drupal\Core\Recipe\RecipeConfigurator::getIncludedRecipe is prone to very bad performance with recipes that bring in more than just a few other recipes. Why? Because more complex recipes with large "stacks" (that is, built on top of other recipes which are themselves built on top of other recipes, and so forth) keep getting parsed, and parsed again, as the recipe system loads them repeatedly. This is a lot of unnecessary work, especially since parsing a recipe is quite a heavy operation due to all the work that the various configurators do.

Proposed resolution

RecipeConfigurator should statically cache recipes it has already loaded.

πŸ› Bug report
Status

Active

Version

11.1 πŸ”₯

Component

recipe system

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

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