perf(workstation): debounce + cache commit detail hydration#1533
Merged
Conversation
Add 120ms debounce and a 100-entry hash-keyed cache to useCommitDetailHydration. Previously every j/k cursor move immediately spawned getCommitDetail (4 git subprocesses). Now: - Rapid navigation resets the timer (no fetch fires mid-scroll) - Previously-viewed commits render instantly from cache with no loading flash - FIFO eviction keeps memory bounded This is the 'biggest felt win' from the keystroke-latency audit (#1365 item 2). Tests updated to use jest fake timers for the debounce.
3 tasks
gfargo
pushed a commit
that referenced
this pull request
Jul 12, 2026
) Adds the same 120ms debounce + bounded (hash, path, oldPath)-keyed cache pattern already shipped for useCommitDetailHydration (#1533) to useCommitFilePreviewHydration, so holding j/k in a commit's file list no longer fires an uncached git show subprocess per cursor move and previously-visited previews redisplay instantly. Co-authored-by: gfargo-horizon-agent[bot] <294710345+gfargo-horizon-agent[bot]@users.noreply.github.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.
The "biggest felt win" from the keystroke-latency audit (#1365, item 2).
Previously every j/k cursor move immediately spawned getCommitDetail (4 git subprocesses). Now:
Tests updated to use jest fake timers for the debounce behavior.
Testing:
Relates to #1365