Repository navigation
Improve resource list performance: virtual scrolling + lightweight counts - #277
Merged
Merged
Conversation
…unts
Two frontend performance improvements for large clusters:
1. Sidebar counts: Replace 233 parallel GET /api/resources/{kind} queries
(608MB total) with a single GET /api/resource-counts call (~2KB).
Full resource data is now fetched only for the currently selected kind.
2. Table virtualization: Replace .map() rendering with TableVirtuoso
(react-virtuoso). Only visible rows + buffer are in the DOM (~500 nodes
instead of ~35,000 for 3,500 resources). Switches from CSS grid layout
to table-layout:fixed with colgroup for column widths. Keyboard
navigation and deep-link scrolling use scrollToIndex().
…ppers - Throw ApiError on all non-OK responses instead of silent return [] - Fix forbiddenKinds guard to use useNewCountsMode only (omitempty compat) - Remove unnecessary setSelectedKind wrapper and handleSelectedKindChange
jessegoodier
pushed a commit
to jessegoodier/radar
that referenced
this pull request
Mar 6, 2026
…unts (skyhook-io#277) * Improve resource list performance: virtual scrolling + lightweight counts Two frontend performance improvements for large clusters: 1. Sidebar counts: Replace 233 parallel GET /api/resources/{kind} queries (608MB total) with a single GET /api/resource-counts call (~2KB). Full resource data is now fetched only for the currently selected kind. 2. Table virtualization: Replace .map() rendering with TableVirtuoso (react-virtuoso). Only visible rows + buffer are in the DOM (~500 nodes instead of ~35,000 for 3,500 resources). Switches from CSS grid layout to table-layout:fixed with colgroup for column widths. Keyboard navigation and deep-link scrolling use scrollToIndex(). * Fix review findings: error handling, forbidden fallback, simplify wrappers - Throw ApiError on all non-OK responses instead of silent return [] - Fix forbiddenKinds guard to use useNewCountsMode only (omitempty compat) - Remove unnecessary setSelectedKind wrapper and handleSelectedKindChange
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.
Summary
Phase 1 of the large-cluster performance plan (follow-up to #273).
Sidebar counts: The Resources page was firing ~233 parallel
GET /api/resources/{kind}calls (608MB total) just to populate sidebar count badges. Now uses a singleGET /api/resource-countscall (~2KB). Full resource data is only fetched for the currently selected kind.Table virtualization: Resource lists with thousands of items (e.g., 3,500 ReplicaSets → 35,000 DOM nodes) caused multi-second renders and scroll jank. Replaced
.map()rendering withTableVirtuosofrom react-virtuoso (already in deps). Only visible rows + buffer are rendered (~500 DOM nodes). Layout switches from CSS grid totable-layout: fixedwith<colgroup>. Keyboard navigation and deep-link scrolling usescrollToIndex().New props on
ResourcesView(resourceCounts,resourceForbidden,selectedKindQuery,onSelectedKindChange) are additive — the legacyresourceQueriesarray still works for backward compatibility.Test plan
/resources/pods?resource=...) scrolls to correct row