Currently Drupal has a static cache for the constraint validators - ConstraintValidatorFactory, but does not have a static cache for the constraints.
For example with the EntityChangedConstraint: if we validate three entities we will create three objects for the EntityChangedConstraint class and only a single object for the EntityChangedConstraintValidator.
Currently when validating just a single node entity we create:
53 Constraint objects without any options.
34 Constraint objects with options.
In order to reduce the number of created objects we should add a static cache for constraint objects as well. The correct place for this should be the ConstraintManager.
Discuss and write a patch.
None.
Not known yet.
None.
Postponed: needs info
11.0 π₯
base system
It affects performance. It is often combined with the Needs profiling tag.
To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.