Repository navigation
perf(web): Go to file, language bar, compare counts and cold ref reads without serial round trips (QW-027/028/059/087) - #253
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 39 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (28)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…thout serial reads QW-028: Go to file answers from the history index at once (then the tree walk, now 16 trees at a time), ranks fuzzily as GitHub's finder does, takes the arrow keys, Enter and the t hotkey, and is on every directory. QW-027: chunk reads asked for in one turn share a query; a history walk reads the next pack blocks ahead; the merge-base search asks for its frontier's parents ahead; counting runs 24 files at a time and counts changes too large to show. dash v22.0.0...v23.0.0 counts in ~14 s and 42 requests (was 176 s, 1,287 and partial). QW-059: the rename read budget (400 blobs, 16 at a time) reaches git's pairs on that compare: 1,530 files, +112310 -69084. QW-087: a cold read of a long ref timeline goes out as 8 key ranges at once, not six pages in a row. The page-budget spec holds these to request and time budgets on the dash mirror. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…parallel walk Review: a change with more edits than a diff shows is now counted from the same xdiff pass (no second, larger search on the main thread); an exception inside the walk's tree-read callback rejects the walk instead of leaving it pending; clearing the chunk cache drops gathered queries too; Go to file keeps matched positions on the path when lowercasing would change its length. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
9e09478 to
1ae346c
Compare
The repo chrome read a long ref timeline as keyset ranges but only fell back to the $createdAt read when a range was refused, so rows a node silently left out were kept for the whole session (later reads fetch only newer rows). Group both ref-update types per ref, run the prevOid completeness check readAllRefUpdates runs, and re-read the ranged types serially when it fails. A range read that throws now falls back too instead of failing the timeline. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…s in flight queueChunkSeqs waited on setTimeout(0), which background tabs clamp to ~1 s, stalling every serial chunk round; it now yields one macrotask through a MessageChannel post (setTimeout only where there is none). Chunk query sends also share one session-wide limit of 16 in flight, so a diff counting many files over several packs plus rename detection cannot burst ~50 proof-verified queries at once. The per-origin slot helper now hands a released slot straight to the next waiter. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
On a repo past the walk's 5000-file cap the partial walk replaced the complete index and results shrank. The walk is now the list only when it finished or there is no index, the 'Searched the first N files' note shows only when the truncated walk is in use, and the highlighted row resets whenever the results change so Enter always opens one. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
walkFiles queued child trees and counted files in read-completion order, so a truncated walk (the language bar, Go to file) kept a timing-dependent set. Reads still run up to 16 at once, but their entries are taken from the head of the started list, as a serial walk would, so the set is the same on every visit. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
With the blob budget at 400 and 1 MiB per blob, rename detection could download ~400 MiB. Bytes are now counted as reads land and no further candidate is read once 64 MiB is spent: the basename phase keeps the pairs it read (the two sides are read interleaved, pair by pair) and skips the matrix; a matrix whose reads ran out is skipped rather than pair with a worse source than git. Typical source trees stay far below the cap. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Pre-merge check: a code-review-validator pass found one blocker and four should-fix items. All five are fixed on this branch (4ba8109..6926b39), and a second review of those fixes came back clean.
Gates after merging current master (including #252, #257 and #258): 🤖 Posted autonomously by Claude on behalf of pasta. |
Code-browse performance fixes from the bonsia QA wave: QW-028, QW-027, QW-087 and QW-059. The page-budget spec now holds each of these to request and time budgets.
What was slow, and why
Every slow path read one thing at a time and waited for each round trip:
What changes
queueChunkSeqs). Platform chunk reads of one pack copy asked for in the same event-loop turn share one query, up to Platform's 100 rows. Reads that run side by side now cost a few queries instead of one each.walkFileskeeps up to 16 tree reads in flight.netprocfindssrc/net_processing.cpp, andvalidation.cpprankssrc/validation.cppfirst.tfocuses the box from anywhere on the page.refUpdateorprotectedRefUpdatepage full on a cold read, it reads the rest as 8refNameHashkey ranges at once. It usesrefs.ts's keyset scan, on therefStateindex. A node that does not honour the ranges falls back to the serial$createdAtpages. Delta reads are unchanged.e2e/page-budget.spec.tsgains cb-1 and cb-2 on the dash mirror. They run on moutai, or anywhere withE2E_SHOWCASE_DASHPAYset.Measured on bonsia (local
next buildagainst the live devnet, read-only; dash mirror)validation.cppsrc/validation.cpp3rdsrc/validation.cpp1stnetproc, ↓ + Enter,tsrc/net_processing.{h,cpp}; opens the choice;tfocusesThe two new page-budget tests pass against that build:
E2E_PORT=4397 E2E_SKIP_BUILD=1 E2E_DEVNET=bonsia E2E_SHOWCASE_DASHPAY=7A1MEu… playwright test page-budget.spec.ts -g "code browsing budgets"reports 2 passed.Tests
fuzzy.test.ts,go-to-file.test.tsx(index first, then the walk; arrows and Enter;t; Esc),chunk-gather.test.ts, and the sequential read-ahead case inread-ahead.test.ts.chrome.test.ts: key ranges in one round trip, and the fallback when a node does not honour them.file-diff.test.ts: changes too large to show are counted.tsc,vitest(4347 passed),eslinton the changed files.code-reviewfindings on this part were addressed (one diff pass for counting, the walk rejects on a callback error, clearing gathered queries, positions under Unicode case folding).🤖 Generated with Claude Code