Skip to content

Speedup copy_src_dirs in bootstrap #145460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Aug 15, 2025

I was kinda offended by how slow it was. Just the copy_src_dirs part took ~3s locally in the x dist rustc-src step. In release mode it was just 1s, but that's kind of cheating (I wonder if we should build bootstrap in release mode on CI though...).

Did some basic optimizations to bring it down to ~1s also in debug mode.

Maybe it's overkill, due to #145455. Up to you whether we should merge it or close it :)

r? @jieyouxu

@rustbot
Copy link
Collaborator

rustbot commented Aug 15, 2025

jieyouxu is currently at their maximum review capacity.
They may take a while to respond.

@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 Aug 15, 2025
@jieyouxu
Copy link
Member

Seems okay, but I'll need to take a closer look tmrw/Sunday.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine, thanks

@jieyouxu
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 16, 2025

📌 Commit 9ce9aa8 has been approved by jieyouxu

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 Aug 16, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Aug 16, 2025

Aur naur this has conflicts, r=me after rebase
@bors r-

@jieyouxu
Copy link
Member

Hemlo? @bors ping

@jieyouxu
Copy link
Member

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 16, 2025
Kobzol added 2 commits August 16, 2025 08:56
The target is removed by `copy_link` too, so no need to duplicate the syscall.
@Kobzol Kobzol force-pushed the bootstrap-speedup-copy-src-dirs branch from 9ce9aa8 to cdea62d Compare August 16, 2025 06:57
@rustbot
Copy link
Collaborator

rustbot commented Aug 16, 2025

This PR was rebased onto a different master commit! Check out the changes with our range-diff.

@Kobzol
Copy link
Member Author

Kobzol commented Aug 16, 2025

@bors r=jieyouxu

@bors
Copy link
Collaborator

bors commented Aug 16, 2025

📌 Commit cdea62d has been approved by jieyouxu

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 16, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 16, 2025
…dirs, r=jieyouxu

Speedup `copy_src_dirs` in bootstrap

I was kinda offended by how slow it was. Just the `copy_src_dirs` part took ~3s locally in the `x dist rustc-src` step. In release mode it was just 1s, but that's kind of cheating (I wonder if we should build bootstrap in release mode on CI though...).

Did some basic optimizations to bring it down to ~1s also in debug mode.

Maybe it's overkill, due to rust-lang#145455. Up to you whether we should merge it or close it :)

r? `@jieyouxu`
bors added a commit that referenced this pull request Aug 16, 2025
Rollup of 11 pull requests

Successful merges:

 - #139345 (Extend `QueryStability` to handle `IntoIterator` implementations)
 - #144838 (Fix outdated doc comment)
 - #145206 (Port `#[custom_mir(..)]` to the new attribute system)
 - #145208 (Implement declarative (`macro_rules!`) derive macros (RFC 3698))
 - #145309 (Fix `-Zregparm` for LLVM builtins)
 - #145355 (Add codegen test for issue 122734)
 - #145420 (cg_llvm: Use LLVM-C bindings for `LLVMSetTailCallKind`, `LLVMGetTypeKind`)
 - #145451 (Add static glibc to the nix dev shell)
 - #145460 (Speedup `copy_src_dirs` in bootstrap)
 - #145476 (Fix typo in doc for library/std/src/fs.rs#set_permissions)
 - #145485 (Fix deprecation attributes on foreign statics)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Aug 17, 2025
Rollup of 11 pull requests

Successful merges:

 - #139345 (Extend `QueryStability` to handle `IntoIterator` implementations)
 - #144838 (Fix outdated doc comment)
 - #145206 (Port `#[custom_mir(..)]` to the new attribute system)
 - #145208 (Implement declarative (`macro_rules!`) derive macros (RFC 3698))
 - #145309 (Fix `-Zregparm` for LLVM builtins)
 - #145355 (Add codegen test for issue 122734)
 - #145420 (cg_llvm: Use LLVM-C bindings for `LLVMSetTailCallKind`, `LLVMGetTypeKind`)
 - #145451 (Add static glibc to the nix dev shell)
 - #145460 (Speedup `copy_src_dirs` in bootstrap)
 - #145476 (Fix typo in doc for library/std/src/fs.rs#set_permissions)
 - #145485 (Fix deprecation attributes on foreign statics)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 17, 2025
…dirs, r=jieyouxu

Speedup `copy_src_dirs` in bootstrap

I was kinda offended by how slow it was. Just the `copy_src_dirs` part took ~3s locally in the `x dist rustc-src` step. In release mode it was just 1s, but that's kind of cheating (I wonder if we should build bootstrap in release mode on CI though...).

Did some basic optimizations to bring it down to ~1s also in debug mode.

Maybe it's overkill, due to rust-lang#145455. Up to you whether we should merge it or close it :)

r? ``@jieyouxu``
bors added a commit that referenced this pull request Aug 17, 2025
Rollup of 10 pull requests

Successful merges:

 - #140794 (Add information about group a lint belongs to)
 - #144476 (rustdoc-search: search backend with partitioned suffix tree)
 - #144838 (Fix outdated doc comment)
 - #145206 (Port `#[custom_mir(..)]` to the new attribute system)
 - #145208 (Implement declarative (`macro_rules!`) derive macros (RFC 3698))
 - #145420 (cg_llvm: Use LLVM-C bindings for `LLVMSetTailCallKind`, `LLVMGetTypeKind`)
 - #145451 (Add static glibc to the nix dev shell)
 - #145460 (Speedup `copy_src_dirs` in bootstrap)
 - #145476 (Fix typo in doc for library/std/src/fs.rs#set_permissions)
 - #145485 (Fix deprecation attributes on foreign statics)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 17, 2025
…dirs, r=jieyouxu

Speedup `copy_src_dirs` in bootstrap

I was kinda offended by how slow it was. Just the `copy_src_dirs` part took ~3s locally in the `x dist rustc-src` step. In release mode it was just 1s, but that's kind of cheating (I wonder if we should build bootstrap in release mode on CI though...).

Did some basic optimizations to bring it down to ~1s also in debug mode.

Maybe it's overkill, due to rust-lang#145455. Up to you whether we should merge it or close it :)

r? ```@jieyouxu```
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 17, 2025
…dirs, r=jieyouxu

Speedup `copy_src_dirs` in bootstrap

I was kinda offended by how slow it was. Just the `copy_src_dirs` part took ~3s locally in the `x dist rustc-src` step. In release mode it was just 1s, but that's kind of cheating (I wonder if we should build bootstrap in release mode on CI though...).

Did some basic optimizations to bring it down to ~1s also in debug mode.

Maybe it's overkill, due to rust-lang#145455. Up to you whether we should merge it or close it :)

r? `````@jieyouxu`````
bors added a commit that referenced this pull request Aug 17, 2025
Rollup of 10 pull requests

Successful merges:

 - #144476 (rustdoc-search: search backend with partitioned suffix tree)
 - #144838 (Fix outdated doc comment)
 - #145206 (Port `#[custom_mir(..)]` to the new attribute system)
 - #145208 (Implement declarative (`macro_rules!`) derive macros (RFC 3698))
 - #145420 (cg_llvm: Use LLVM-C bindings for `LLVMSetTailCallKind`, `LLVMGetTypeKind`)
 - #145451 (Add static glibc to the nix dev shell)
 - #145460 (Speedup `copy_src_dirs` in bootstrap)
 - #145476 (Fix typo in doc for library/std/src/fs.rs#set_permissions)
 - #145485 (Fix deprecation attributes on foreign statics)
 - #145489 (library: Migrate from `cfg_if` to `cfg_select`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Aug 17, 2025
Rollup of 9 pull requests

Successful merges:

 - #144476 (rustdoc-search: search backend with partitioned suffix tree)
 - #144838 (Fix outdated doc comment)
 - #145206 (Port `#[custom_mir(..)]` to the new attribute system)
 - #145208 (Implement declarative (`macro_rules!`) derive macros (RFC 3698))
 - #145420 (cg_llvm: Use LLVM-C bindings for `LLVMSetTailCallKind`, `LLVMGetTypeKind`)
 - #145451 (Add static glibc to the nix dev shell)
 - #145460 (Speedup `copy_src_dirs` in bootstrap)
 - #145476 (Fix typo in doc for library/std/src/fs.rs#set_permissions)
 - #145485 (Fix deprecation attributes on foreign statics)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 17, 2025
…dirs, r=jieyouxu

Speedup `copy_src_dirs` in bootstrap

I was kinda offended by how slow it was. Just the `copy_src_dirs` part took ~3s locally in the `x dist rustc-src` step. In release mode it was just 1s, but that's kind of cheating (I wonder if we should build bootstrap in release mode on CI though...).

Did some basic optimizations to bring it down to ~1s also in debug mode.

Maybe it's overkill, due to rust-lang#145455. Up to you whether we should merge it or close it :)

r? ``````@jieyouxu``````
bors added a commit that referenced this pull request Aug 17, 2025
Rollup of 10 pull requests

Successful merges:

 - #144838 (Fix outdated doc comment)
 - #145206 (Port `#[custom_mir(..)]` to the new attribute system)
 - #145208 (Implement declarative (`macro_rules!`) derive macros (RFC 3698))
 - #145309 (Fix `-Zregparm` for LLVM builtins)
 - #145355 (Add codegen test for issue 122734)
 - #145420 (cg_llvm: Use LLVM-C bindings for `LLVMSetTailCallKind`, `LLVMGetTypeKind`)
 - #145451 (Add static glibc to the nix dev shell)
 - #145460 (Speedup `copy_src_dirs` in bootstrap)
 - #145476 (Fix typo in doc for library/std/src/fs.rs#set_permissions)
 - #145485 (Fix deprecation attributes on foreign statics)

r? `@ghost`
`@rustbot` modify labels: rollup
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.

4 participants