Performance issues using LocalValidatorFactoryBean
We have been using LocalValidatorFactoryBean to validate over 1 million objects. After performance profiling and looking at multiple stack dumps, it seems like Spring is creating a new instance of validator every time. This is killing our performance. I have used another implementation of JSR 303 and a new instance of each validator is not created per validation.
Is there a way to disable this functionality of LocalValidatorFactoryBean? We don't need to persist any data and prefer to use validators as a singleton. It seems like the autowiring of each class is slow and not worth doing it every time.
Any help would be appreciated.