OpenAPITools / OpenAPITools/openapi-generator
[BUG] Long init times for springdoc-openapi
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
To Reproduce
spring-boot: 2.7.1
springdoc-openapi 1.6.9
The sample project can be found here: https://github.com/mdoh/test-api-server
Init duration for springdoc-openapi is: 10243 ms
I run it on an M1 Max, Spring-Boot 2.7.1., Java 17.
The problem was also reported here: https://github.com/springdoc/springdoc-openapi/issues/1737 but this bug was closed.
@thlaegler reported there to have the same issues with large models.
If you add more endpoints using the same model the loading time goes up the more endpoints you add. I added 10 endpoints to the Controller, all are responding the same model. The more endpoints I add the slower the rendering is
setting springdoc.pre-loading-enabled=true also not helps much.
It would be nice if you could have a look!
Thank you
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked sample project and reproduce startup using Spring Boot 2.7.1, Java 17, and springdoc-openapi 1.6.9. Compare initialization time as endpoints using the same model are added; done means the reported long initialization is explained and the regression or performance problem is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi, spring-boot
- Domain
- api, backend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100