feat(webui): virtualize data tables to handle thousands of rows - #360
Merged
Conversation
List views rendered every row into the DOM, so a shared-files list with thousands of entries put thousands of <tr> (with selects/progress bars) through Preact's diff on each SSE update, locking the main thread. Add a shared, column-config-driven VirtualTable (js/table.js) that windows the visible rows plus overscan with spacer rows, using table-layout:fixed for stable column widths (with a computed min-width so narrow screens scroll horizontally instead of collapsing), a fixed row height, sticky thead, and keyed rows. It also owns sortable headers, deduplicating the Th/cmp/sortVal helpers that were copy-pasted across four views. Migrate shared, downloads, search, servers and peers to it. Make the peers table sortable (default: busiest first) and add a text filter to the downloads, shared and peers tables, mirroring the search filter via a shared textMatcher helper. Fix multi-select so it stays consistent with the active filter: select-all now acts only on the filtered rows, the selection is pruned to the visible set when the filter changes (never keeps hidden rows selected), and a "Selected N" count is shown next to the bulk actions.
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.
List views rendered every row into the DOM, so a shared-files list with thousands of entries put thousands of (with selects/progress bars) through Preact's diff on each SSE update, locking the main thread.
Add a shared, column-config-driven VirtualTable (js/table.js) that windows the visible rows plus overscan with spacer rows, using table-layout:fixed for stable column widths (with a computed min-width so narrow screens scroll horizontally instead of collapsing), a fixed row height, sticky thead, and keyed rows. It also owns sortable headers, deduplicating the Th/cmp/sortVal helpers that were copy-pasted across four views.
Migrate shared, downloads, search, servers and peers to it. Make the peers table sortable (default: busiest first) and add a text filter to the downloads, shared and peers tables, mirroring the search filter via a shared textMatcher helper.
Fix multi-select so it stays consistent with the active filter: select-all now acts only on the filtered rows, the selection is pruned to the visible set when the filter changes (never keeps hidden rows selected), and a "Selected N" count is shown next to the bulk actions.