| When validating the constraints, we do the following:
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:
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)
|