workspace inheritiance slowing down cargo startup times #10747
Labels
A-workspace-inheritance
Area: workspace inheritance RFC 2906
C-bug
Category: bug
Performance
Gotta go fast!
Problem
@ehuss noticed that workspace inheritance caused a significant increase in startup times when using workspace inheritance.
When running the same test (as described here) I got
This is a large increase in time and should be addressed before stabilization
Steps
Original steps
@ehuss's testing notes
Modified steps using
+nightly
Extract this file in
benches/workspaces
rust2.zip
This is just a quick hack that adds inheritance to a bunch of packages, but I didn't really put much thought into setting it up.
Extract
rust.tgz
in that directory, too.Prime the target directory with a cache of
rustc
info. Inrust
andrust2
, run:cargo +nightly c -p linkchecker
. Otherwise it would be measuringrustc
overhead.Test out some command that spends most of its time loading the workspace. There aren't very many good candidates, but
cargo metadata
orcargo tree
can work. I use hyperfine for quick measurements. For example:Possible Solution(s)
One possible solution would be to record paths of workspace roots that can be checked before walking the filesystem to look for a workspace root. The biggest problem with this is where to record everything.
Config
is one place and there is some precedence for a cache being put in there.Notes
No response
Version
The text was updated successfully, but these errors were encountered: