You are correct. Hibernate 6.0.11 removes this performance issue entirely - here are some unofficial results from a test I wrote to mimic the behavior we're seeing (HibernateTest.java pom.xml): Simulating 150 req/s for 30s: 5.4.2: HibernateTest - Successful: 3519, Failures: 0, Rejected: 981, Took: 301867ms 5.4.2 (concurrent): HibernateTest - Successful: 4500, Failures: 0, Rejected: 0, Took: 30007ms 6.0.11: HibernateTest - Successful: 4500, Failures: 0, Rejected: 0, Took: 29996ms 6.0.11 (concurrent): HibernateTest - Successful: 4500, Failures: 0, Rejected: 0, Took: 29995ms My test needed a few changes to work with 6.0.11 - I had to replace @UnwrapValidatedValue with the new equivalent as documented in the release notes. I believe DropWizard will need to update their code to match as well, and currently they are blocked on Hibernate 5.4.x (https://github.com/dropwizard/dropwizard/issues/2127) - perhaps on Jersey working with the latest version? |