Scope
refactron/rag/indexer.py — _index_file
Problem
Every indexed file does CodeChunker(self.parser) inside the loop. The chunker is stateless aside from the parser reference; reallocating it per file adds avoidable overhead in large repos.
Suggested direction
- Instantiate
CodeChunker once in RAGIndexer.__init__ Reuse it in _index_file.
Acceptance
- No behavior change; tests green.
Scope
refactron/rag/indexer.py—_index_fileProblem
Every indexed file does
CodeChunker(self.parser)inside the loop. The chunker is stateless aside from the parser reference; reallocating it per file adds avoidable overhead in large repos.Suggested direction
CodeChunkeronce inRAGIndexer.__init__Reuse it in_index_file.Acceptance