Skip to content

rustc --emit=dep-info does too much work #40328

Closed
@luser

Description

@luser

I'm working on caching Rust compilation in sccache, and I got it working but it's not as fast as I had hoped. As part of the design that @alexcrichton, @glandium and I hashed out, I'm running rustc --emit=dep-info to get a list of source files as input to the hash used as the cache key. It turns out that running that takes almost as long as actually compiling the crate for some crates. For example, on my machine compiling the rand crate takes ~1.9s, and running just rustc --emit=dep-info for the same crate takes ~1.1s.

@eddyb looked at the -Z time-passes output and determined that rustc is doing too much work in this case. The fix looks simple, thankfully, so I'm going to try to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions