Skip to content

Share target directories between benchmarks #738

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

Merged
merged 4 commits into from
Aug 4, 2020

Conversation

Mark-Simulacrum
Copy link
Member

Previously, each benchmark would rebuild dependencies from scratch, which was
somewhat inefficient: many dependencies in Rust are shared amongst crates (e.g.,
syn, serde). This shares them across all benchmarks.

The next step would be to go further, and share between build kinds (e.g., build
scripts only need to be built once). But we don't actually have a good way of
just building build scripts, so that's left out of scope for now. It is also unclear
how big a win this would be.

Previously, each benchmark would rebuild dependencies from scratch, which was
somewhat inefficient: many dependencies in Rust are shared amongst crates (e.g.,
syn, serde). This shares them across all benchmarks.

The next step would be to go further, and share between build kinds (e.g., build
scripts only need to be built once). But we don't actually have a good way of
doing so, so that's left out of scope for now.
@Mark-Simulacrum
Copy link
Member Author

I am working on gathering local numbers for how much of a win this is -- it seems like it might actually be a loss (perhaps from increased copying) on CI...

@Mark-Simulacrum
Copy link
Member Author

I am struggling to gather local numbers (still getting environment setup on a new computer), but I suspect that regardless the discrepancy in available parallelism and such may mean that I wouldn't really reflect what happens in prod anyway. I'm going to merge this. It is passing CI, and it should not affect the final crate's builds. In the worst case we can revert and delete generated artifacts if something does go wrong unexpectedly.

@Mark-Simulacrum Mark-Simulacrum merged commit fe431ec into rust-lang:master Aug 4, 2020
@Mark-Simulacrum Mark-Simulacrum deleted the share-build-cache branch August 4, 2020 18:40
@Mark-Simulacrum
Copy link
Member Author

Okay this does indeed seem to be a regression:

  • 01:47:05 before this landed
  • 01:51:52 after this landed

Nothing obviously slower landed in rustc in that time either. I am unsure yet if there's some room for wins here or if we should just revert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant