Skip to content

perf: consolidate Scanner::walk_files traversals honoring per-check budgets #197

Closed

Description

@hyperpolymath

Deferred from CodeRabbit T3 on #185 (trivial severity, scanner-cold path).

Consolidating the seven walks in aletheia/src/checks.rs without changing per-check budget semantics is correctly-scoped heavy-lift perf work, out of scope for the review it came from. Track it here.

Acceptance: fewer traversals, identical budget semantics, 68+47 suite green, clippy -D warnings clean.

Activity

  1. added
    enhancementNew capability or improvement to existing behaviour
    performanceThroughput, latency, memory, binary size
    on Sep 22, 2026
  2. hyperpolymath commented on Sep 24, 2026

    @hyperpolymath
    OwnerAuthor

    Resolved in e477b400 (PR #228), merged 2026-09-24.

    ScanSet consolidates the per-check walks into a single traversal — one set of extension buckets, filled once — and caches it (files: OnceCell<ScanSet>). walk( no longer appears in aletheia/src/checks.rs; walk_into_set is the only traversal. Per-check budget semantics are unchanged, with three unit tests covering exactly that:

    • test_scan_set_cap_is_per_bucket
    • test_scan_set_filtered_buckets_cap_independently
    • test_scan_set_routes_each_extension_to_its_buckets

    Measured: 7 walks to 1; 212 ms to 150 ms on a tree of 18,602 files across 673 directories; verdicts byte-identical before and after.

    The repo's own gate is green on the merge commit: rust-ci passed all five jobs (build debug + release, full test suite, fmt --check, clippy -D warnings, zero-dependency check) on both the PR head and the merged main.

    This issue stayed open only because the PR body read "Closes #186 and #197" — GitHub pairs the closing keyword with the first issue only, so "#197" was treated as a plain reference. Nothing was outstanding in the code.

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 capability or improvement to existing behaviourperformanceThroughput, latency, memory, binary size

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions