Skip to content

perf(compile): avoid blocking fs reads in the async compile path for the package-config check #2358

Open

Description

@jamesadevine

Follow-up from the #2315 review (Rust reviewer, unposted theme).

package_config_check::collect_warnings runs on the async compile path but uses blocking std::fs (read_dir, metadata, read_to_string) to scan at most nine small files at the repository root.

The cost is negligible today, and compile does other synchronous I/O. Even so, the scan should either use tokio::fs or spawn_blocking, or document why blocking I/O is acceptable here, so the pattern doesn't spread to larger scans.

Acceptance criteria

  • Either the scan runs off the async executor, or a comment justifies the bounded blocking I/O.
  • No behaviour change, and the existing tests pass.

Activity

  1. github-actions commented on Oct 16, 2026

    @github-actions
    Contributor

    🏷️ Triaged

    Labeled as enhancement, rust, refactor.

    Why: Proposes moving blocking std::fs reads in the Rust compile path off the async executor (or documenting them) with no behavior change.

    Automated triage — a maintainer can adjust labels anytime.

    Generated by Issue Triage for #2358 · auto · 12.1 AIC · ⊞ 9.7K · ◷

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 requestrefactorrustPull requests that update rust code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions