As I mentioned on the forum, these 2 things are not going to be equal - they are different concepts. @ConverterRegistration is quick to resolve because it was designed that way. It is not a JPA concept, and so we are free to do that how we want. We are more restricted when it comes to auto-applied converters as that is a JPA concept and we need to abide by its requirements. That being said, it is always a good idea to address performance issue when and where we can. Here specifically, I am suspiciously eyeing 2 things:
- The use of lambdas (matcher) used in the auto-apply case. Those can easily be transformed to method references
- The stream/filter/collect combo used in the auto-apply case.
Perhaps you’d be willing to take a swing at a PR for that and see if that helps your performance numbers? |