| Looking at your code, it is indeed very specific. You really only do what is necessary for your particular use case. In Hibernate Validator you need to deal with a generic approach and you will need to do metadata creation and caching, ConstraintValidator resolution, message interpolation, call to traversable resolver, etc. I don't really see how this is directly comparable.
I have yet to look at the HV source code.
Sure, any additional pair of eyes are welcome. Really to make any improvements as part of this issue, we would need to pin point some concrete problems in the Validator code. There are probably many things which can be improved.
Although the performance gain is not as drastic as seen when handling entities, there is still ~25% gain when handling regular beans.
I am a bit confused here on what you are saying? When you say entities, do you mean JPA entities opposed to plain Pojos? If so, there will always be a difference. In the context of JPA, you need to call as per spec the TraversableResolver as well. That adds another overhead. So what are you really saying here? That using your custom solution is ~25% faster for plain Pojos than using Hibernate Validator? If so, that would not be so bad imo. |