Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue in 3.1.x #1371

Closed
ArtyomGabeev opened this issue Aug 16, 2023 · 1 comment
Closed

Performance issue in 3.1.x #1371

ArtyomGabeev opened this issue Aug 16, 2023 · 1 comment

Comments

@ArtyomGabeev
Copy link

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 pushed a commit that referenced this issue Sep 5, 2023
gregturn added a commit that referenced this issue Sep 5, 2023
@gregturn gregturn self-assigned this Sep 5, 2023
@gregturn gregturn added this to the 3.1.7 milestone Sep 5, 2023
@gregturn
Copy link
Contributor

gregturn commented Sep 5, 2023

Thanks @ArtyomGabeev! That has been polished and merged to main.

@gregturn gregturn closed this as completed Sep 5, 2023
@gregturn gregturn linked a pull request Sep 5, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants