Method org.hibernate.loader.Loader#wrapResultSetIfEnabled is completely synchronized and shows as a bottleneck in performance tests.
I am not sure if the synchronization is not needed anymore (at all), but from the look of it should be fairly straight forward to reduce the scope of the lock to a smaller code area.
|