rust-lang / rust-lang/rust

Performance issue for x test tidy

Open
#143,032 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-tidy C-bug T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

x test tidy now cost about 19s on my machine (a M2 mac), I think it's a little bit too long for a trivial fix like https://github.com/rust-lang/rust/pull/142871, when I discussed with @jieyouxu , he told me it only cost 9s on his dev environment(a WSL).

so I added some logs for cost time in each check in tidy test:
https://github.com/chenyukang/rust/blob/106a6d46375f7c13d4fee3511736193f59b74542/src/tools/tidy/src/main.rs#L87-L95

The result for each part is:

Image

I also meet the issue of https://github.com/rust-lang/rust/issues/134648, but I do not know how to reproduce it now.

  • Do we need to run every tidy check phase for all kind of changes, I guess we may improve on this
  • Running them concurrently could speed things up https://github.com/rust-lang/rust/issues/141074
  • I haven't got the reason why it's much slower on my dev compared to @jieyouxu 's dev, maybe network speed ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running x test tidy and inspect the timing instrumentation discussed for src/tools/tidy/src/main.rs lines 87–95. Compare the costs of each tidy check phase, investigate the environment difference described in the issue, and review issues 134648 and 141074. Done means the bottleneck and a concrete performance improvement are identified and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
performance, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.