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

WebSocket Tool hangs on large responses #2614

Open
mDuo13 opened this issue Jun 5, 2024 · 1 comment
Open

WebSocket Tool hangs on large responses #2614

mDuo13 opened this issue Jun 5, 2024 · 1 comment
Labels
bug Typo or other small documentation error web dev Styles, templates, or other technologies for how the site is built & presented

Comments

@mDuo13
Copy link
Collaborator

mDuo13 commented Jun 5, 2024

When you use the WebSocket tool and receive a large JSON response, the interface lags and seems to hang at some point without rendering the whole response document. This appears to be a problem in our use of CodeMirror or something related to it.

Example of a request that prompts a very large reponse: https://xrpl.org/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fs1.ripple.com%2F&req=%7B%20%20%22id%22%3A%202%2C%0A%20%20%22command%22%3A%20%22account_tx%22%2C%0A%20%20%22account%22%3A%20%22rMARkETxZ2mVC7tVBeSimqkevY2ARW45kg%22%2C%0A%20%20%22ledger_index_min%22%3A%2088071543%2C%0A%20%20%22ledger_index_max%22%3A%2088081544%2C%0A%20%20%22binary%22%3A%20false%2C%0A%20%20%22limit%22%3A%20100%2C%0A%20%20%22forward%22%3A%20false%0A%7D

Possible solutions might involve changing how we use CodeMirror, or even not using CodeMirror for responses (esp. over a certain size). Further investigation is necessary to identify the cause and whether or not CodeMirror is indeed the bottleneck.

BTW, I was able to reproduce the problem on the old Dactyl-based version of the site, so it's not specifically a problem with React or Redocly.

@mDuo13 mDuo13 added bug Typo or other small documentation error web dev Styles, templates, or other technologies for how the site is built & presented labels Jun 5, 2024
@AKCodez
Copy link
Contributor

AKCodez commented Jun 11, 2024

image Noticed a maximum call stack size exceeded error in the console as well as the page being very laggy, this must be related to some recursive function missing a base case. Have not looked at the code yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Typo or other small documentation error web dev Styles, templates, or other technologies for how the site is built & presented
Projects
None yet
Development

No branches or pull requests

2 participants