chao / RESTClient

RESTClient, a debugger for RESTful web services.
http://www.restclient.net
BSD 3-Clause "New" or "Revised" License
703 stars 172 forks source link

Large JSON response preview performance is poor #324

Open wfhartford opened 6 years ago

wfhartford commented 6 years ago

When an HTTP response body is very large, the performance of the preview tab is very bad, causing the browser to hang while rendering. If the performance of the JSON rendering cannot be improved, it might be a good idea to warn the user before starting the render of very large response bodies, or provide a configurable maximum size to render, reverting to the plain text view like the response tab if the body is too large.

smoore4moma commented 6 years ago

I've done this before (requested too much and the browser hangs), but I never thought of it as a problem with RESTClient. Instead you can select "Download response body" and then open it with a text editor or other.

wfhartford commented 6 years ago

My opinion is that if an extension hangs the browser, it is an issue with the extension. If a user is aware that they are going to be getting a very large response, they can certainly avoid the "preview" tab, but I am often surprised by the size of the response, or simply forget that the response will be large while the "preview" tab is already selected.