Open
Description
After some discussion on zulip it looks like rayon
will immediately spawn all threads for the thread pool on startup, but this isn't neessarily suitable for rustc's use case. In a profile I captured of compiling Cargo the first set of crates being compiled spent a huge amount of time just spawning threads.
I ran perf
at the start of cargo build
and killed it after a second or so, and the profile output of this (cleaned up) aggregated across all builds was:
I think that roughly means that 80% of the cpu time was spent transitively spawning threads/processes near the start of the build, and that seems a bit excessive!