Skip to content

DocRepoIngester: parallelize LLM extraction across files #88

Description

@itdove

Summary

DocRepoIngester.scan_and_process() processes files sequentially in a loop. Each file triggers one or more LLM calls via provider.extract_from_chunk(). Since LLM inference is network-bound I/O, files could be processed in parallel.

Fix

Use concurrent.futures.ThreadPoolExecutor in scan_and_process() to process files concurrently. Cap concurrency to avoid overwhelming the LLM server.

Acceptance Criteria

  • scan_and_process processes files concurrently
  • Configurable max workers (default: 4)
  • Error handling per file preserved (one failure doesn't stop others)
  • Results are deterministic (sorted by file path)
  • All existing tests pass

Discovered during /simplify review of #37.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions