Avoid recalculating PropShapes for plugins multiple times in a request

Created on 6 August 2025, 2 days ago

Overview

\Drupal\experience_builder\PropShape\PropShape::getComponentPropsForMetadata can be called multiple times for the same component in one request. This leads to `storage_prop_shape_alter` because called multiple times for the same prop shapes.

This causes \Drupal\experience_builder\Hook\ShapeMatchingHooks::mediaLibraryStoragePropShapeAlter to be run quite a bit and it can be expensive. Each time it loads the media types and instantiates their source plugins.

Proposed resolution

Statically cache prop shapes per plugin ID

User interface changes

✨ Feature request
Status

Active

Version

1.0

Component

… to be triaged

Created by

🇺🇸United States mglaman WI, USA

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

Comments & Activities

Production build 0.71.5 2024