## Issue
The agent may run very slowly on projects that contain many or large
binary files not listed in `.gitignore`.
## Solution
Temporarily rewrite `.git/info/exludes` to ignore:
- Common binary files based on the extension
- Files larger than 2 MB
## Benchmark
I measure the time between sending an agent message in UI ("hitting
Enter") and actually sending it to an LLM. Ideally, it should be
instant. Numbers for a 7.7 GB Rust project with no .gitignore.
Filter | Time
----------------------------------|-----
No filter (= before this change) | 62 s
Exclude common file types only | 1.46 s
Exclude files >2MB only | 1.16 s
Exclude both | 0.10 s
## Planned changes:
- [x] Exclude common binary file types
- [x] Exclude large files
- [ ] Track files added by agent so we could delete them (we can't rely
on git for that anymore)
- [ ] Don't block on waiting for a checkpoint to complete until we
really need it
- [ ] Only `git add` files that are about to change
Closes #ISSUE
Release Notes:
- Improved agent latency on repositories containing many files or large
files
|
||
|---|---|---|
| .. | ||
| src | ||
| test_data | ||
| Cargo.toml | ||
| LICENSE-GPL | ||