Skip to content

test: time rexdiff on large repositories, and add library benchmarks - #20

Merged
rednafi merged 5 commits into
masterfrom
rel/4-perf
Oct 29, 2026
Merged

rednafi merged 5 commits into
masterfrom
rel/4-perf

Conversation

@rednafi

@rednafi rednafi commented Oct 29, 2026

Copy link
Copy Markdown
Owner
  • test/perf_test.go times start-up, keys, reloads, memory and idle
    CPU. It runs only if REXDIFF_PERF names a directory.
  • Benchmarks for vcs and the file tree.

Stacked on rel/3-limit-tests. Merge in order.

@rednafi
rednafi force-pushed the rel/3-limit-tests branch 2 times, most recently from a41b9f3 to 638040f Compare October 29, 2026 16:45
@rednafi
rednafi force-pushed the rel/4-perf branch 2 times, most recently from 1326828 to 704f823 Compare October 29, 2026 17:04
… settled library API

Diff
- Use znkr.io/diff in place of go-udiff. Diffs match git, also for
  large rewrites. A file over 10,000 lines uses the fast diff.
- A file version over 2,000,000 bytes or 50,000 lines shows
  "file too large to show". A diff holds at most 128 MiB of text, and a
  change of more than 20,000 files shows only the count.

Speed
- Render lines only when they come into view, and highlight in the
  background with time limits. Slow lexers and very long lines show plain.
- Read blobs in parallel with a cache. List files, watch, and load the
  commit picker off the UI goroutine. Reloads wait less after an edit.
- Cap Markdown size, depth and work, PR text, find, and grep, so no
  input freezes the UI.

Layout
- A narrower file list, the full path above the diff, a thinner
  separator and gutter, and no rule above the footer.
- The left arrow closes an expanded fold. The hover tooltip is gone.

Fixes
- Scroll through a wrapped line taller than the pane. Keep the cursor
  visible in a one-row body and in a tall rendered block.
- Show invisible characters in names and code, and cut wide names to
  the list width.
- ] and [ step over removed blocks in rendered Markdown.
- The PR tab counts every check, and names the failed ones.
- Send a review over 64 KB in parts.
- -log files are private, hold no typed text, and a FIFO with no
  reader fails at once.
- -check validates -scope and -layout. A branch with no commits, a
  binary file, and tiny panes show clear notes.
- A file created and deleted around a reload leaves the list.

API
- diff: real Row, Fold, Kind and Side types; RenderFile takes
  FileOptions; SplitLines; always lazy.
- vcs: PR with Tally, File.Err, TooManyFilesError.Count, Watcher.Reset.
- rex: New and update.NewInstaller return (value, ok); Paste sends in
  parts; update.Restart takes env first.
- Code names follow the herdr-reviewr settings (navigator, hunk,
  scope, allFiles). Settings, keys, flags and resume state are unchanged.
- Black-box tests for Markdown depth and size, tall lines, too many
  files, large files, PR checks past 100, the setting names, and a
  private log with no typed text.
- Library tests for long lines and the highlighter time limits.
test/e2e.sh builds rexdiff and walks the user guide step by step in
its own Rex session, with fake agent, gh, clipboard, editor and
browser. It also checks resizes from 1x1 to 300x80, hostile names, a
review over 64 KB, and the Rex JSON shapes that the fake rex copies.
Each step polls the screen until it is whole and holds the text.
It replaces TestRealRex.
- test/perf_test.go times start-up, keys, reloads, memory and idle
  CPU. It runs only if REXDIFF_PERF names a directory.
- Benchmarks for vcs and the file tree.
@rednafi
rednafi deleted the branch rel/3-limit-tests October 29, 2026 17:28
@rednafi rednafi closed this Oct 29, 2026
test: walk every feature in a real Rex with test/e2e.sh
@rednafi rednafi reopened this Oct 29, 2026
@rednafi
rednafi changed the base branch from rel/3-limit-tests to master October 29, 2026 17:40
@rednafi
rednafi merged commit cb883cd into master Oct 29, 2026
4 checks passed
@rednafi
rednafi deleted the rel/4-perf branch October 29, 2026 17:46
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