Skip to content

Conversation

@Karavil
Copy link

@Karavil Karavil commented Dec 31, 2025

Summary

Use git ls-files instead of ripgrep for file tree generation (~7000x faster on large repos).

Problem

On large repos (42k+ files), file tree generation was taking 8+ seconds because ripgrep scanned ALL files before limiting output to 200.

Changes

  • Add FileTree module using git ls-files --cached --others --exclude-standard
  • Cache file tree at Instance level
  • Remove Ripgrep.tree (replaced by FileTree.tree)

Performance (M3 MacBook Pro, 42k file repo)

  • File tree: 8.39s → ~1ms

🤖 Generated with Claude Code

@Karavil Karavil marked this pull request as draft December 31, 2025 04:42
@Karavil Karavil force-pushed the perf/file-tree-scanning branch 4 times, most recently from 577ff4a to 493a899 Compare December 31, 2025 04:48
On large repos (42k+ files), file tree generation was taking 8+ seconds
because ripgrep scanned ALL files before limiting output.

Changes:
- Add FileTree module using git ls-files (~7000x faster)
- Cache file tree at Instance level
- Remove Ripgrep.tree (replaced by FileTree.tree)
- Update debug commands to use FileTree

Performance (M3 MacBook Pro, 42k file repo):
- File tree: 8.39s → ~1ms

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@Karavil Karavil force-pushed the perf/file-tree-scanning branch from 493a899 to 2bfa7ae Compare December 31, 2025 04:49
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