Reduce the number of calls to ReflectionHelper#getValue()

Description

When validating the constraints, we do the following:

This works pretty well when you have only one constraint per location. But it's suboptimal when there are several constraints at the same location.

We should have a map of constraints per location and do the following:

This change should be properly benchmarked with:

  • the SimpleBeanValidation benchmark to be sure it's not slower in the simple case

  • the Bean Validation benchmark to see how it improves the situation (in the BV benchmark, there are several locations annotated with several constraints)

Environment

None

Status

Assignee

Marko Bekhta

Reporter

Guillaume Smet

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

backportDecision

None

backportReEvaluate

None

Components

Priority

Major
Configure