We're updating the issue view to help you get more done. 

Reduce the number of calls to ReflectionHelper#getValue()

Description

When validating the constraints, we do the following:

1 2 3 4 for each constraint append the location node get the value for the location of the constraint validate the constraint

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:

1 2 3 4 5 for each location append the location node get the value for the location for constraints at this location validate the constraint

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

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

backportReEvaluate

None

Components

Priority

Major