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

Improve performance of getGenericMapResponse #2873

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ML-Marco
Copy link

I migrate a bigger project from Springfox to Springdoc 1.8.0 (as a temporary step) and to Springdoc 2.8.3.
With Springfox the performance to generate the API definition was pretty good with approximately 5 seconds. After migrating to Springdoc 1.8.0 this increased to 20 seconds. Since the calculation happens only once this was still ok.

But with the update to Springdoc 2.8.3 it increased considerably. Now it takes 120 seconds to generate the same API definition.

I did some profiling and found this easy fix to help improve performance a little. With this fix I'm now down to 83 seconds. This is still too high and I'll try to find further improvements.

Here is a screenshot of the CPU time analysis in JProfiler. As you can see, the call to ControllerAdviceBean.findAnnotatedBeans(applicationContext) is quite expensive in total.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant