Skip to content

perf: snappier lists, diffs and repository opens - #22

Merged
erwin-wee merged 4 commits into
mainfrom
perf/snappy-ui
Sep 19, 2026
Merged

erwin-wee merged 4 commits into
mainfrom
perf/snappy-ui

Conversation

@erwin-wee

Copy link
Copy Markdown
Owner

Summary

  • Window the diff, changes and history lists: only rows in view are rendered; syntax highlighting, split pairing and intraline diffs compute lazily per block. DiffPane and list rows are memoized, App selectors narrowed, sidebar drag driven from the DOM, one shared RelativeTime timer.
  • Cut git spawns on repository open: dedupe concurrent remote -v, one config --get-regexp per scope for identity/signing, concurrent submodule/indicator walks, check-attr --stdin, size guard on conflict files.
  • Stop double-debouncing repo.changed: watcher debounce 350 → 120 ms, renderer's second 150 ms timer removed, node_modules/cache churn ignored.

Verification

  • npm run typecheck clean
  • vitest run: 81 files, 1071 passed, 4 skipped (new test/windowing.test.ts covers visibleRange)

Notes for review

  • getConfigIdentity with no repo now reads global scope only (system /etc/gitconfig no longer consulted).
  • Watcher ignores churn inside node_modules, __pycache__, .cache, .venv, .idea at the worktree root.

Render only the rows in view (plus overscan) in TextDiff, ChangesTab and
HistoryTab through a shared useWindowedRows hook; syntax highlighting,
split-view pairing and intraline diffs are computed lazily per block as rows
scroll in. Memoize DiffPane and the list rows, narrow App's store selectors,
drive the sidebar drag from the DOM and share one RelativeTime timer.
Dedupe concurrent `remote -v` calls, read identity and signing config with
one `config --get-regexp` per scope, walk submodules and repository
indicators a few at a time, pass check-attr paths over stdin, and bail out
of oversized conflict files before parsing them.
The watcher already coalesces bursts, so the renderer's second 150 ms timer
only added latency. Shorten the watcher debounce to 120 ms and ignore churn
under node_modules and similar cache directories.
Carry the listbox/option keyboard-access attributes from the UI audit onto
the windowed FileRow and CommitRow components.
@erwin-wee
erwin-wee merged commit 3d1a837 into main Sep 19, 2026
2 checks passed
@erwin-wee
erwin-wee deleted the perf/snappy-ui branch September 19, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant