Repository navigation
Desktop: draw only the result rows on screen, and throttle progress events - #537
Merged
Merged
Conversation
…vents The results table rendered every row and re-rendered all of them on every selection change and scroll (the scroll handler set overflow state even when it had not changed). Production build in headless Chrome, 2 runs: rows arrow key (median) scroll step tab switch 4,096 107-117 ms -> 33 ms 59-65 -> 33 0.9 s -> 33 ms 20,000 620-660 ms -> 50-66 313-321 -> 33 4.7-5.5 s -> 100 ms 33 ms is the measurement floor (two frames). Above 200 rows the table now renders the rows in view plus 20 either side between two spacer rows (rowWindow.ts), scrolls a focused row into view itself since an unrendered row cannot scrollIntoView, and sets aria-rowcount and aria-rowindex so assistive tech still counts every row. Overflow state is only set when an edge actually changes. Checked on 4,096 rows: the middle of the result renders without gaps, and End lands on the last row, on screen, with aria-activedescendant pointing at it. Desktop progress events: one per port or host was one IPC event and one React update each, 4,096 for a full port scan. The backend now sends at most one per operation per 100 ms, plus the first, the last and each phase change.
Contributor
|
Site preview: https://pr-537.netscli-site-preview.pages.dev Built from 0aa7615 with Production is unaffected: netscli.com is served from GitHub Pages via |
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.
Gap 3 from the audit.
Measured
Production build, headless Chrome, a scan result of N rows, two runs each:
33 ms is the measurement floor: two animation frames. 4,096 is a full port scan; 20,000 rows is a long packet capture.
What changed
rowWindow.ts). Above 200 rows the table renders the rows in view plus 20 either side, between two spacer rows that keep the scrollbar the full size. Below 200 everything renders as before.scrollIntoView.aria-rowcountandaria-rowindexkeep the true row count for assistive tech.Checked
aria-activedescendantpointing at it (screenshots in the session).vite build,cargo clippy -p netscli-gui -D warnings, its 25 Rust tests.The spacer CSS is in its own file because
results.cssis at its size cap.