Skip to content

perf(repos): serialize repository list refreshes - #524

Closed
beruro wants to merge 2 commits into
junyu/rpc-performance-closurefrom
perf/repo-list-coordination
Closed

perf(repos): serialize repository list refreshes#524
beruro wants to merge 2 commits into
junyu/rpc-performance-closurefrom
perf/repo-list-coordination

Conversation

@beruro

@beruro beruro commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • share one repository-list IPC request across concurrent consumers
  • queue exactly one trailing list read when force refresh or a repository mutation supersedes an active response
  • fence stale responses so they cannot overwrite the post-mutation list
  • let useRepoLoader start a force generation without falsifying the global in-flight flag
  • release failed flights so later loads can retry

Validation

  • repository coordinator Vitest suite: 4 passed
  • pnpm exec tsc --noEmit --pretty false
  • Prettier and ESLint on all changed files
  • git diff --check

Performance guard

Pass. No timer, polling loop, or retained result cache is added. There is at most one active list IPC plus one generation-triggered trailing read; mutation invalidation is demand-driven and all in-flight state is released on success or error.

Architecture audit

Covered compilation, single ownership of list-flight state, generation semantics, mutation parity, failure recovery, and hook/API boundary behavior. Wire payloads and repository mapping remain unchanged.

@beruro
beruro changed the base branch from develop to junyu/rpc-performance-closure July 27, 2026 05:11
@beruro

beruro commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

Closing after folding its only remaining delta—the failed-read retry regression test—into #512. The production coordinator was already identical to #512; the focused suite now passes 4/4 there.

@beruro beruro closed this Jul 27, 2026
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