Repository navigation
Prioritize current combined diff rows and drop obsolete queued loads - #35594
Conversation
b261806 to
0225eeb
Compare
|
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 14 minutes. View limit details
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 |
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryThe PR gives rendered, expanded combined-diff rows priority without changing the serial load limit.
No actionable issues were found. Tests were reviewed but not run.
|
ELI5
After scrolling through unloaded combined-diff rows, the row currently on screen can wait behind requests for rows already passed. Load the current expanded row next and skip obsolete automatic requests before they reach the Git transport.
What Changed
The concurrency cap remains 1. This changes renderer queue admission only: no active I/O cancellation, backend/process/cache changes, wire changes or new UI controls.
Why
The serial completion policy protects Monaco mount work, but FIFO admission makes a newly visible row wait for obsolete viewport requests. Keeping the cap while prioritizing the current viewport removes that queued waste without a new fetch/mount concurrency policy.
The tests are deterministic and exercise queue admission order; no latency, frame-rate, CPU or Git subprocess improvement is claimed.
Linked Issue
Partial fix for #35479; leave the issue open. #35570 separately scopes status invalidation. Metadata-only whole-view resets, backend batching/caching, and full local/remote cold/warm throughput/frame measurements remain separate work. Open #35048 handles cancellation of issued reads; its actual patch does not change this pending scheduler.
Visual Proof
N/A — this changes queue admission before content publication, with the same controls, interactions and rendered content. No rendered responsiveness claim is made.
Testing
Linux, Node 24.22.0, private dependency tree, short private TMPDIR,
ORCA_BACKGROUND_LAUNCH=1.combined-diff-load-scheduler.test.ts: a rendered viewport row loads before earlier queued rows, an explicit offscreen request is kept, and a viewport-only request that left the rendered set is dropped.combined-diff-viewport-load-order.test.tsx: through the real registry, loader, retry and scheduler, an automatic reload that scrolls offscreen while queued is not fetched, and the row reloads when it is rendered again (no stale content left behind).main. The one-linecombined-diff-stale-analysis-work-budget.test.tsxupdate marks its row as rendered, which viewport-only loads now require.ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --maxWorkers=2: 22/22 checks passed on the rebased head.No Electron app launched. Windows/macOS/SSH were considered through unchanged routing and transport; no runtime performance evidence was collected there. Folder workspaces use the same queue; mobile does not use this combined viewer scheduler.
Review
Production scheduler, registry, loader and retry changes reviewed before publication. Six perf-scan questions covered: admission before expensive work, single viewer ownership, renderer/host boundary, bounded viewport scans and progress, unchanged host routing, and release of obsolete pending work. Active issued reads remain with their existing owner.
Agent skill upstream boundary
Notes
Additive loader/registry overlap with #35048 needs normal integration. No new processes, timers, subscriptions, caches, payload formats or host-specific paths.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred) — changed gate passed; full platform builds remain for CI