Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Closed
#199 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
51/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
electron, git, typescript

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
2
Forks
2
Avg merge
5h 28m
Merged PRs (30d)
24

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PierrunoYT/patch

All issues in PierrunoYT/patch

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.