Skip to content

Slow coherence checking and type checking. #138828

Open
@coolcatcoder

Description

@coolcatcoder

I was working on creating a crate and encountered some unexpectedly long compile times.
I don't have a minimal reproduction, but I have expanded my macros, and copied the code into a playground.

It occurs on all channels. It is still pretty bad even with the parallel front-end enabled. According to time-passes, the biggest culprits were coherence checking and type checking.

time:   6.038; rss:   80MB ->  272MB ( +192MB)  coherence_checking
time:   6.084; rss:   80MB ->  274MB ( +195MB)  type_check_crate

My use case is clearly atypical, so I will understand if you consider this frivolous and close it. (Although, when I searched to see if my issue had already been reported, I did notice submitted situations that were arguably even less likely to be encountered by anyone.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-coherenceArea: CoherenceA-trait-systemArea: Trait systemC-bugCategory: This is a bug.I-compiletimeIssue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions