Skip to content

x test tidy can be faster #141074

Closed
Closed

Description

@onur-ozkan

Right now, x test tidy includes two additional checks besides tidy itself: auto-completions and rustfmt check. Currently, they run sequentially, but running them concurrently could speed things up; potentially saving around one second depending on the machine specs. It's a quite popular and frequently used command, so it's worth making it faster.

Somewhat related: #141073

Activity

  1. added
    C-enhancementCategory: An issue proposing an enhancement or a PR with one.
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    on May 16, 2025
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on May 16, 2025
  3. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on May 16, 2025
  4. chenyukang commented on May 16, 2025

    @chenyukang
    Member

    absolutely worth to improve here, on my machine it cost 16 seconds now:

    ➜  rust git:(up-master) x test tidy       
    Building bootstrap
        Finished `dev` profile [unoptimized] target(s) in 0.25s
    Building stage0 tool tidy (aarch64-apple-darwin)
        Finished `release` profile [optimized + debuginfo] target(s) in 0.39s
    fmt check
    fmt info: No modified files detected for formatting.
    tidy check
    x.py completions check
    Build completed successfully in 0:00:16
  5. changed the title [-]`x test tidy` can be slightly faster[/-] [+]`x test tidy` can be faster[/+] on May 16, 2025
  6. the8472 commented on Jun 26, 2025

    @the8472
    Member

    One problem is that x is supposed to obey parallelism limits (-j) and both tidy and rustfmt individually respect that but via explicitly passed limits, not via jobserver support. So executing them in parallel would mean they'd not cooperatively limit themselves.

  7. added 2 commits that reference this issue on Oct 8, 2026
  8. added a commit that references this issue on Oct 8, 2026
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

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions