docs(perf): add list virtualization implementation plan and perf fixtures - #10984
Merged
Conversation
…ures Planning documents for virtualizing the large-list rendering paths in Swagger UI, plus the generated OpenAPI fixtures the future E2E tests will need. No production code changes. Three phases, each targeting a list that today renders in full regardless of viewport: - Phase 1: models/schemas list (json-schema-5) - Phase 2: the self-contained oas31 models copy - Phase 3: operations list Each phase virtualizes only above an item-count threshold, so specs below it keep today's markup, DOM and find-in-page behaviour unchanged. That choice is what keeps the existing Cypress and Selenium selectors valid, at the cost of maintaining two render paths per component. The documents record verified findings that are easy to get wrong when implementing, including: collapsed operations and models already unmount their subtrees, so the win is in row count rather than subtree depth; model deep-linking does not exist, so the readyToScroll refs in models.jsx are dead code; and virtual items need content-derived getItemKey values, with the tag included for operations, or component state follows the wrong row. Virtualizing schema property lists was considered and rejected — the reasoning is in the README. Fixtures are generated and deliberately sized above the thresholds so the virtualized path is actually exercised; many-operations.yaml includes a two-tag operation to cover the duplicate-key case. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
glowcloud
approved these changes
Aug 6, 2026
Contributor
|
🎉 This PR is included in version 5.32.13 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds planning documents for virtualizing Swagger UI's large-list rendering paths, plus the generated OpenAPI fixtures the future E2E tests will need. No production code changes — this is documentation and test fixtures only.
Three phases, each targeting a list that currently renders in full regardless of viewport:
json-schema-5)oas31models copyEach phase virtualizes only above an item-count threshold, so specs below it keep today's markup, DOM structure and find-in-page behaviour unchanged. That is what keeps the existing Cypress and Selenium selectors valid without edits — at the cost of maintaining two render paths per component, which the docs call out explicitly.
Motivation and Context
Large specs (Kubernetes, GitHub, AWS) carry 500–1000+ operations and 200–800+ schemas, and today every one of them mounts on load. The result is slow first paint, high memory use, and sluggish expand/collapse.
The documents exist to front-load the findings that are easy to get wrong during implementation. Several were verified against the code and contradict the obvious assumption:
Collapsereturns<noscript/>;ModelCollapserenders{ expanded && children }). So the win is in row count, not subtree depth — the expected gain is smaller than "800 full schema trees → 15" would suggest, and the docs size it accordingly.isShownKeyFromUrlHashArrayonly ever emits["operations", …]keys, so thereadyToScrollcalls inmodels.jsxare dead code. An earlier draft treated this as a blocking risk; it isn't.getItemKeyvalues, with the tag included for operations — an operation under two tags renders twice, and index keys would let component state (an open try-it-out panel) follow the wrong row.Virtualizing schema property lists was considered and rejected (recursive rendering vs. TanStack's flat-list requirement); the reasoning is recorded in the README so it doesn't get re-litigated.
How Has This Been Tested?
Not applicable — no code changes. The fixtures were validated as parseable and their counts checked programmatically:
many-schemas.swagger.yaml/many-schemas.openapi.yaml— 240 schemas eachmany-schemas.openapi31.yaml— 240 schemas,openapi: 3.1.0(routes to theoas31component, notjson-schema-5)many-operations.yaml— 529 operations across 24 tags, and includes a two-tag operation covering the duplicate-key caseAll are sized deliberately above the proposed thresholds, so the virtualized path is actually exercised rather than silently falling back to the legacy one.
Notes for reviewers
.claude/implementation/rather thandocs/, to keep them out of the published GitBook.estimateSize, and the perf baselines) because they need measuring on a real machine rather than guessing.Checklist
🤖 Generated with Claude Code