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

Separate Group and MetaConstraint - Path processed units in ValidationContext

Description

As `processedUnits` set happens to be accessed quite often in ValidationContext, it can be split into two separate ones

  • processedPathUnits which would contain `BeanPathMetaConstraintProcessedUnit`

  • processedGroupUnits which would contain `BeanGroupProcessedUnit`

By doing this, equals method of corresponding processed unit classes can be simplified as well.

Some benchmark numbers based on such changes:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 one set # Run complete. Total time: 00:01:55 Benchmark Mode Cnt Score Error Units CascadedValidation.testCascadedValidation thrpt 20 215.283 ± 18.728 ops/ms CascadedWithLotsOfItemsAndMoreConstraintsValidation.testCascadedValidationWithLotsOfItems thrpt 20 501.128 ± 68.409 ops/s CascadedWithLotsOfItemsValidation.testCascadedValidationWithLotsOfItems thrpt 20 830.734 ± 107.699 ops/s Result "org.hibernate.validator.performance.cascaded.CascadedWithLotsOfItemsValidation.testCascadedValidationWithLotsOfItems": 892.383 ±(99.9%) 14.613 ops/s [Average] (min, avg, max) = (854.388, 892.383, 923.493), stdev = 16.829 CI (99.9%): [877.770, 906.997] (assumes normal distribution) # Run complete. Total time: 00:01:51 Two sets Benchmark Mode Cnt Score Error Units CascadedValidation.testCascadedValidation thrpt 20 278.193 ± 4.795 ops/ms CascadedWithLotsOfItemsAndMoreConstraintsValidation.testCascadedValidationWithLotsOfItems thrpt 20 652.048 ± 8.913 ops/s CascadedWithLotsOfItemsValidation.testCascadedValidationWithLotsOfItems thrpt 20 892.383 ± 14.613 ops/s

Environment

None

Status

Assignee

Marko Bekhta

Reporter

Marko Bekhta

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

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Minor