Skip to content

shave 150ms off bootstrap#131954

Merged
bors merged 1 commit into
rust-lang:masterfrom
the8472:bootstrap-parallel-git
Oct 22, 2024
Merged

shave 150ms off bootstrap#131954
bors merged 1 commit into
rust-lang:masterfrom
the8472:bootstrap-parallel-git

Conversation

@the8472

@the8472 the8472 commented Oct 20, 2024

Copy link
Copy Markdown
Member

This starts git commands inside GitInfoand the submodule updates in parallel. Git should already perform internal locking in cases where it needs to serialize a modification.

OLD
Benchmark #1: ./x check core
  Time (mean ± σ):     608.7 ms ±   4.4 ms    [User: 368.3 ms, System: 455.1 ms]
  Range (min … max):   602.3 ms … 618.8 ms    10 runs

NEW
Benchmark #1: ./x check core
  Time (mean ± σ):     462.8 ms ±   2.6 ms    [User: 350.2 ms, System: 485.1 ms]
  Range (min … max):   457.5 ms … 465.6 ms    10 runs

This should help with the rust-analyzer setup which issues many individual ./x check calls. There's more that could be done but these were the lowest-hanging fruits that I saw.

@rustbot

rustbot commented Oct 20, 2024

Copy link
Copy Markdown
Collaborator

r? @Kobzol

rustbot has assigned @Kobzol.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Oct 20, 2024
Comment thread src/bootstrap/src/utils/helpers.rs Outdated
Comment thread src/bootstrap/src/lib.rs
this saves about 150ms on many ./x invocations
@the8472
the8472 force-pushed the bootstrap-parallel-git branch from a96be9b to a269e4d Compare October 20, 2024 11:36
@Kobzol

Kobzol commented Oct 21, 2024

Copy link
Copy Markdown
Member

I saw only about ~40 ms improvement locally, but this might be worse for HDDs and/or more complex git index states. Even though this creates a new output function, it does not complicate the code very much and seems like it can have useful perf. benefits. Let's land this for now.

@bors r+

@bors

bors commented Oct 21, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit a269e4d has been approved by Kobzol

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 21, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 21, 2024
…bzol

shave 150ms off bootstrap

This starts `git` commands inside `GitInfo`and the submodule updates in parallel. Git should already perform internal locking in cases where it needs to serialize a modification.

```
OLD
Benchmark #1: ./x check core
  Time (mean ± σ):     608.7 ms ±   4.4 ms    [User: 368.3 ms, System: 455.1 ms]
  Range (min … max):   602.3 ms … 618.8 ms    10 runs

NEW
Benchmark #1: ./x check core
  Time (mean ± σ):     462.8 ms ±   2.6 ms    [User: 350.2 ms, System: 485.1 ms]
  Range (min … max):   457.5 ms … 465.6 ms    10 runs
```

This should help with the rust-analyzer setup which issues many individual `./x check` calls. There's more that could be done but these were the lowest-hanging fruits that I saw.
@bors

bors commented Oct 21, 2024

Copy link
Copy Markdown
Collaborator

⌛ Testing commit a269e4d with merge 39f707f...

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors

bors commented Oct 21, 2024

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 21, 2024
@the8472

the8472 commented Oct 21, 2024

Copy link
Copy Markdown
Member Author

seems spurious. @bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 21, 2024
fmease added a commit to fmease/rust that referenced this pull request Oct 22, 2024
…Kobzol

shave 150ms off bootstrap

This starts `git` commands inside `GitInfo`and the submodule updates in parallel. Git should already perform internal locking in cases where it needs to serialize a modification.

```
OLD
Benchmark #1: ./x check core
  Time (mean ± σ):     608.7 ms ±   4.4 ms    [User: 368.3 ms, System: 455.1 ms]
  Range (min … max):   602.3 ms … 618.8 ms    10 runs

NEW
Benchmark #1: ./x check core
  Time (mean ± σ):     462.8 ms ±   2.6 ms    [User: 350.2 ms, System: 485.1 ms]
  Range (min … max):   457.5 ms … 465.6 ms    10 runs
```

This should help with the rust-analyzer setup which issues many individual `./x check` calls. There's more that could be done but these were the lowest-hanging fruits that I saw.
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 22, 2024
Rollup of 6 pull requests

Successful merges:

 - rust-lang#129935 (make unsupported_calling_conventions a hard error)
 - rust-lang#130432 (rust_for_linux: -Zregparm=<N> commandline flag for X86 (rust-lang#116972))
 - rust-lang#131697 (`rt::Argument`: elide lifetimes)
 - rust-lang#131954 (shave 150ms off bootstrap)
 - rust-lang#131982 (Represent `hir::TraitBoundModifiers` as distinct parts in HIR)
 - rust-lang#132017 (Update triagebot.toml)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 22, 2024
…kingjubilee

Rollup of 6 pull requests

Successful merges:

 - rust-lang#130432 (rust_for_linux: -Zregparm=<N> commandline flag for X86 (rust-lang#116972))
 - rust-lang#131697 (`rt::Argument`: elide lifetimes)
 - rust-lang#131807 (Always specify `llvm_abiname` for RISC-V targets)
 - rust-lang#131954 (shave 150ms off bootstrap)
 - rust-lang#132015 (Move const trait tests from `ui/rfcs/rfc-2632-const-trait-impl` to `ui/traits/const-traits`)
 - rust-lang#132017 (Update triagebot.toml)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit aba227b into rust-lang:master Oct 22, 2024
@rustbot rustbot added this to the 1.84.0 milestone Oct 22, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 22, 2024
Rollup merge of rust-lang#131954 - the8472:bootstrap-parallel-git, r=Kobzol

shave 150ms off bootstrap

This starts `git` commands inside `GitInfo`and the submodule updates in parallel. Git should already perform internal locking in cases where it needs to serialize a modification.

```
OLD
Benchmark #1: ./x check core
  Time (mean ± σ):     608.7 ms ±   4.4 ms    [User: 368.3 ms, System: 455.1 ms]
  Range (min … max):   602.3 ms … 618.8 ms    10 runs

NEW
Benchmark #1: ./x check core
  Time (mean ± σ):     462.8 ms ±   2.6 ms    [User: 350.2 ms, System: 485.1 ms]
  Range (min … max):   457.5 ms … 465.6 ms    10 runs
```

This should help with the rust-analyzer setup which issues many individual `./x check` calls. There's more that could be done but these were the lowest-hanging fruits that I saw.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants