Skip to content

perf: Local ./lint spends 164 s in serial ci/test_*.py self-tests #949

Closed

Description

@zackees

Context

Measured on 2026-10-15 on a 16-CPU Linux host: ./lint takes about 300 seconds.

Step Time
self_test (python -m unittest discover -s ci) 164 s
clippy 51 s
clang-format (every tracked file) 48 s
dylint 20 s
cargo fmt / gersemi / ratchet 18 s

The slowest self-tests do real builds or start real tools:

Test Time
test_windows_package_arguments 25 s
test_local_gate_probe (runs a Rust test lane) 21 s
test_windows_runtime_mutation (real PowerShell) 16 s
test_app_config_identity (several tests) ~41 s

AGENTS.md documents ./lint as an 8-second step.

Proposal

  • Run the self-tests in parallel, per file, with a process pool sized to CPU count.
  • Move the build-and-run tests into their own gate lane, so ./lint stays a lint.
  • clang-format and gersemi check only files changed against origin/master locally. CI keeps checking every file.

Acceptance criteria

  • ./lint under 60 s warm on the same host, with before and after timings in the PR.
  • No test is dropped: the moved tests still run in CI and in the local gate.
  • AGENTS.md's quoted time matches the measured one.

Decisions

Related

Activity

  1. zackees commented on Oct 16, 2026

    @zackees
    MemberAuthor

    Main part shipped in #991: the self-tests run in parallel, one process per file, with workers capped at the usable CPU count and a per-file timeout. That took ./lint's self-test step from about 164 s to about 64 s locally (48 s on 4 CPUs, as on CI). The rest (an own lane for the build-and-run tests, and changed-files-only formatting locally) is in #1050.

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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions