Reuse one GitService per project instead of building one per IPC call

クローズ
#199 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
51/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
electron, git, typescript

調査の方向性

Start with src/main/index.ts:117-121 and trace how git() creates GitService and how status refreshes are triggered. Then inspect GitService and its filter-list loading; the proposal is to reuse a service per project path and refresh filters when .git/config changes or periodically. Done means repeated IPC calls reuse the service without leaving filter data stale.

索引モデルが issue の本文から書いたものです。

説明

enhancement performance priority: low severity: low

Suggestion from the 2026-10-07 code review (not a bug).

git() in src/main/index.ts:117-121 creates a new GitService for every IPC call. Each one runs an extra git config to list the repository's filter drivers, and a single status() spawns 4–6 git processes. The status refreshes on project open, after every agent run and on panel actions.

Proposal

Cache the service per project path and refresh the filter list when .git/config changes (mtime check), or at most every few seconds.

主要言語
TypeScript
スター
2
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。