Skip to content

feat: Concurrent file analysis with rate limiting, retries, and rich progress bar #33

Description

@CodeMaverick-143

Feature Request

Implement asynchronous or multi-threaded concurrent analysis with automatic exponential backoff retries and a rich progress bar.

Problem with Current Implementation

Currently, insight/analyzer.py loops over all files sequentially:

for idx, file_path in enumerate(files, start=1):
    results.append(analyze_file(file_path))

In repos with 50–100 files, sequential network requests to the Gemini API take multiple minutes. Furthermore, bursts of requests can trigger HTTP 429 (Rate Limit) errors with no retry or backoff handling.

Proposed Solution

  1. Use concurrent.futures.ThreadPoolExecutor(max_workers=5) (or asyncio).
  2. Add exponential backoff retry for HTTP 429 and network errors.
  3. Integrate rich.progress.Progress for an interactive, animated terminal progress bar showing ETA, percentage, and current processing file.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions