swagger-api / swagger-api/swagger-ui
UI hangs when typing in request body
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Q&A (please complete the following information)
- OS: [Windows 10 Education]
- Browser: [Chrome]
- Version: [71.0.3578.98 (Official Build) (64-bit)]
- Method of installation: [NSwag, Swagger editor]
- Swagger-UI version: [3.19.0-3.20.3]
- Swagger/OpenAPI version: [OpenAPI 3.0.0]
Content & configuration
Example Swagger/OpenAPI definition:
https://pastebin.com/raw/Zh5ZGN17
Note: This spec is obfuscated
Swagger-UI configuration options:
Swagger editor default settings
Describe the bug you're encountering
Every key press in the request body takes about ~800 ms to process. The ui hangs and freezes while typing and opening operations also takes a very long time.
To reproduce...
Steps to reproduce the behavior:
- Go to any post operation
- Click on try it out
- Type in the request body field
- The UI will hang for a while for each keystroke, the more keystrokes the longer
Expected behavior
The UI does not hang or only for a very short time when entering words in the request body text field.
Additional information
Callstack of a single key press event:

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 slowdown in Swagger UI 3.19.0–3.20.3 using the provided OpenAPI definition, a POST operation, and the request body field in Chrome. Start with the reported keypress call stack and browser profiling; done means typing and opening operations no longer incur the reported per-keystroke hangs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100