swagger-api / swagger-api/swagger-ui
Lazy load model properties
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
| Q | A |
|---|---|
| Bug or feature request? | Performance Bug |
| Which Swagger/OpenAPI version? | 2.0 |
| Which Swagger-UI version? | 3.11 |
| How did you install Swagger-UI? | PetStore |
| Which browser & version? | Chrome |
| Which operating system? | Win 10 |
Demonstration API definition
petstore.swagger.io/...&url=https://heldersepu.github.io/hs-scripts/swagger/4248_swagger.json
Expected Behavior
Fast expansion of model properties
Current Behavior
Very slow expansion of model properties
Possible Solution
Lazy load model properties like we do the models
Context
Looking at the current implementation, the collapsed models show right away (big thanks 2 @shockey)
Expanding small models is quick, but the largest models (such as Patrimonio ) takes quite a while, once it fully expands, expanding child models takes no time...
I believe that is because we are loading the entire tree of the model.
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
Reproduce the delay with the linked PetStore demonstration API, especially the large Patrimonio model, and inspect the existing model and property expansion flow. The change is done when model properties expand without eagerly loading the entire child tree and the observed expansion delay is substantially reduced; the issue names no files or tests to start from.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, openapi
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100