[PR #56] Performance improvements #226

Closed
opened 2026-03-02 04:13:00 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/56

State: closed
Merged: Yes


Investigated performance issues with very wide (100k+ files) repos. It seems like almost all the overhead comes from libgit2 being ~2-3x slower than calling git directly (at least on unix).

This PR

  • introduces git-ai benchmark to help enterprises profile the impact of the checkpoint command.
  • aims to get performance in-line with a regular status` run.

Before changes:
JPEG image
After changes:
JPEG image

Future work:
git-ai doesn't need to care about untracked files unless agents explicitly write to them. It should be possible to make this much faster than status if we maintain a list of files the AI has touched in the working log. The new checkpoint [preset] pattern opens up a lot of options since the hooks for file edits explicitly tell us which file is being edited.

**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/56 **State:** closed **Merged:** Yes --- Investigated performance issues with very wide (100k+ files) repos. It seems like almost all the overhead comes from libgit2 being ~2-3x slower than calling git directly (at least on unix). This PR - [x] introduces `git-ai benchmark` to help enterprises profile the impact of the checkpoint command. - [x] aims to get performance in-line with a regular status` run. Before changes: ![JPEG image](https://github.com/user-attachments/assets/209c7038-9e24-4341-9305-af97d8aa705e) After changes: ![JPEG image](https://github.com/user-attachments/assets/44d6d4a0-dede-4998-8880-5c96ef7c3f51) Future work: `git-ai` doesn't need to care about untracked files unless agents explicitly write to them. It should be possible to make this much faster than status if we maintain a list of files the AI has touched in the working log. The new `checkpoint [preset]` pattern opens up a lot of options since the hooks for file edits explicitly tell us which file is being edited.
kerem 2026-03-02 04:13:00 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#226
No description provided.