swagger-api / swagger-api/swagger-ui

Performance issue when typing text

Open
#5,850 14 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

  • OS: macOS, windows
  • Browser: Safari, IE, Chrome
  • Method of installation: dist
  • Swagger-UI version: 3.25.0
  • Swagger/OpenAPI version: OpenAPI 3.0.1

With a large definition file (150+ models and resources) there is a noticeable lag when I am typing in input fields. The issue is most pronounced on IE.

Issue appears to be similar to what was reported in #4057 however the plugin workaround doesn't address the issue. The console log does report 'render' for each key press but the early return doesn't improve the performance the way it was reporting in the original issue.

Example Swagger/OpenAPI definition:
openapi-example.yaml.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the lag with the attached large OpenAPI example, focusing on typing in input fields and the repeated console “render” messages. Read issue #4057 and compare its plugin workaround with this case across the listed browsers, especially IE. Done means typing is responsive with a large definition file and the unnecessary render behavior is addressed.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.