Skip to content

Add size limits for large diffs in comparison reports #24

@ArjenSchwarz

Description

@ArjenSchwarz

Context

From code review of #21 (multi-spec comparison feature).

Current Behavior

Large diffs are split into separate files when they exceed 500 lines (internal/report/generator.go:78-92), which is good. However, the threshold is line-based only.

Potential Issue

Very long lines or binary content could still result in large memory usage even with fewer than 500 lines.

Suggested Improvements

  1. Add a byte size check in addition to line count (e.g., 100KB threshold)
  2. Add warnings when processing very large repositories
  3. Consider streaming for extremely large diffs

Priority

Low - edge case that would require unusually large single-file changes to trigger.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions