Hardy Ferentschik commented on Improvement HV-621

I see, you likely need a weak Key concurrent map, but that's going to introduce some overhead of its own.

Right, even though there is actually already some caching going on in this class. It uses a ConcurrentMap in this case. We probably should have a look at this as well. Either way, this does not cover the caching of the reflection call Class#getInterfaces. Thinking about it, much could be gained by adding a special case for the default group (java.validation.Default). In this case there is no need to call #getInterfaces at all and I would assume that is the most common case. Might be the reason why you noticed the contention in the first place. Probably a lot of parallel validations of the default group leading to contention around the lock for Class#getInterfaces.

What about using the Jandex index to read these?

I don't think this would make much of a difference and I don't want to introduce another dependency just for that.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira