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

too slow when rendering response which is array of huge elements #167

Open
ArulJeyananth opened this issue Oct 4, 2021 · 3 comments
Open

Comments

@ArulJeyananth
Copy link

when the number is entries in a result is approx 10000, it takes approximately 3 to 5 mins to render the same in swagger UI ,

When I test my application APIs with swagger it takes longer time to display the result.
Response content type: application/Json
[
{"Id": 1,"name": "test 0001" },
{ "Id": 2, "name": "test 0003" },
<< add 10000 more entries >>
{ "Id": 10000, "name": "test 10000" },
]

@ubogdan
Copy link
Contributor

ubogdan commented Oct 4, 2021

@ArulJeyananth Your issue is more related to the high number of response items and this behavior is quite normal.
What exactly does this have to do with gin-swagger ?

@ArulJeyananth
Copy link
Author

yes. it is due to "high number of response items"
may be I have to raise this issue in core swagger?

@ubogdan
Copy link
Contributor

ubogdan commented Oct 11, 2021

In normal circumstances, you shouldn't reply with a large number of items and you may use a paginated result and lazy load the items.
Swag is just a documentation generator, I don't see how we can help more in this matter.

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

No branches or pull requests

2 participants