You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UI performance issue when clicking on each endpoint and viewing its contents.
To reproduce...
Steps to reproduce the behavior:
On Swagger UI
Click to open a service
Click to open an endpoint
Loading icon hangs for ~6 seconds
Expected behavior
Endpoint information displays promptly without excessive delays.
Screenshots
Additional context or thoughts
Updating to swagger-ui-dist:5.18.2 (from 4.19.1) there is a UI performance issue when clicking on each endpoint and viewing its contents. Loading icon hangs for ~6 seconds, see screenshot. Once content loads, performance for that expansion is good. Issue persists on OpenAPI 3.1.0 spec but not OpenAPI spec < 3.1.0. I've reviewed a similar issue thread here: #8606 - tested swapping our spec for twitter's (https://gist.github.com/char0n/0623cf602c23de8628b7e06012cfbf00) but issue still persists. We've tested swagger-ui-dist versions between 5.1.0 to 5.18.2 and the performance seems to degrade as the version increases. Oddly enough, as a workaround, we've discovered by manually overriding the 'openapi' value within the spec before initializing, the performance issued is resolved and the UI operates as expected.
I think what we're seeing here is a described in #9513 (comment), section "Cycles (circular references)", but without testing on your actual definition it's impossible to tell. I can create a recipe for you using ApiDOM dereferencing and you can report back how long the dereferencing took. Would that work for you?
Q&A (please complete the following information)
Content & configuration
Angular project using swagger-ui-dist:5.18.2
Example Swagger/OpenAPI definition:
N/A - large definition (11mb)
Swagger-UI configuration options:
Describe the bug you're encountering
UI performance issue when clicking on each endpoint and viewing its contents.
To reproduce...
Steps to reproduce the behavior:
Expected behavior
Endpoint information displays promptly without excessive delays.
Screenshots
Additional context or thoughts
Updating to swagger-ui-dist:5.18.2 (from 4.19.1) there is a UI performance issue when clicking on each endpoint and viewing its contents. Loading icon hangs for ~6 seconds, see screenshot. Once content loads, performance for that expansion is good. Issue persists on OpenAPI 3.1.0 spec but not OpenAPI spec < 3.1.0. I've reviewed a similar issue thread here: #8606 - tested swapping our spec for twitter's (https://gist.github.com/char0n/0623cf602c23de8628b7e06012cfbf00) but issue still persists. We've tested swagger-ui-dist versions between 5.1.0 to 5.18.2 and the performance seems to degrade as the version increases. Oddly enough, as a workaround, we've discovered by manually overriding the 'openapi' value within the spec before initializing, the performance issued is resolved and the UI operates as expected.
Eg.
Is there some configuration flag to handle this performance issue? Are there unforeseen consequences for overriding the openapi version?
The text was updated successfully, but these errors were encountered: