Performance issue in 3.1.x
ArtyomGabeev opened this issue · 1 comments
ArtyomGabeev commented
Hi,
In 3.1.6 version of the project, I've found a performance issue around AxiomUtils class.
If Axiom library version is 1.2, org.springframework.ws.soap.axiom.support.AxiomUtils.AXIOM14_IS_PRESENT check always scan claspath without caching the value.
When I analyze application via JProfiler, see a lot of threads blocked on class lookup:
org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader.loadClass(java.lang.String, boolean) (line: 69)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(java.lang.String) (line: 1220)
java.lang.Class.forName0(java.lang.String, boolean, java.lang.ClassLoader, java.lang.Class)
java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (line: 467)
org.springframework.util.ClassUtils.forName(java.lang.String, java.lang.ClassLoader) (line: 292)
org.springframework.util.ClassUtils.isPresent(java.lang.String, java.lang.ClassLoader) (line: 354)
org.springframework.ws.soap.axiom.support.AxiomUtils.AXIOM14_IS_PRESENT() (line: 57)
org.springframework.ws.soap.axiom.AxiomPayloadUtils.createNonCachingPayload(org.apache.axiom.soap.SOAPBody, org.apache.axiom.soap.SOAPFactory) (line: 44)
org.springframework.ws.soap.axiom.AxiomSoapBody.<init>(org.apache.axiom.soap.SOAPBody, org.apache.axiom.soap.SOAPFactory, boolean) (line: 47)
org.springframework.ws.soap.axiom.AxiomSoap11Body.<init>(org.apache.axiom.soap.SOAPBody, org.apache.axiom.soap.SOAPFactory, boolean, boolean) (line: 44)
org.springframework.ws.soap.axiom.AxiomSoapEnvelope.getBody() (line: 74)
Caching the value reduces latency two times, by making concurrent requests.
I'll open a pr with the fix.
Thanks,
Artyom
gregturn commented
Thanks @ArtyomGabeev! That has been polished and merged to main
.