# Exploring Crate Graph Build Times with \`cargo build -Ztimings\`

**URL:** <https://internals.rust-lang.org/t/exploring-crate-graph-build-times-with-cargo-build-ztimings/10975>\
**Category:** cargo\
**Created:** [September 20, 2019, 4:37pm UTC](https://internals.rust-lang.org/t/exploring-crate-graph-build-times-with-cargo-build-ztimings/10975 "2019-09-20T16:37:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dtolnay](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/dtolnay/32/1447_2.png) [@dtolnay](https://internals.rust-lang.org/u/dtolnay)\
**Post date:** [September 20, 2019, 6:51pm UTC](https://internals.rust-lang.org/t/exploring-crate-graph-build-times-with-cargo-build-ztimings/10975/2 "2019-09-20T18:51:38Z")

</div>

As you flagged in [serde-rs/serde#1146](https://github.com/serde-rs/serde/issues/1146#issuecomment-532385628), procedural macros currently never get pipelined with their dependencies. Would it be reasonable for Cargo to automatically apply the transformation of turning all dependency-having proc macro crates into small shims around an underlying non proc macro impl crate to get better pipelining?

```rust
#[proc_macro_derive(Deserialize, attributes(serde))]
pub fn derive_deserialize(input: TokenStream) -> TokenStream {
    serde_derive_impl::derive_deserialize(input)
}

```

### Before:

 ![not-pipelined](https://us1.discourse-cdn.com/flex002/uploads/rustlang/original/2X/6/6fe22b66a8c3789ad4074eb9aeacc8017dd37574.png)

### After:

 ![pipelined](https://us1.discourse-cdn.com/flex002/uploads/rustlang/original/2X/b/bf91894b763de565270c96ea30ce033205964557.png)

---

_[View the full topic](https://internals.rust-lang.org/t/exploring-crate-graph-build-times-with-cargo-build-ztimings/10975)._
