Skip to content
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

regression in compilation times on 1.31.0-nightly (4bd4e4130 2018-10-25) #55390

Closed
Geal opened this issue Oct 26, 2018 · 6 comments
Closed

regression in compilation times on 1.31.0-nightly (4bd4e4130 2018-10-25) #55390

Geal opened this issue Oct 26, 2018 · 6 comments
Labels
C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-compiletime Issue: Problems and improvements with respect to compile times. P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Geal
Copy link
Contributor

Geal commented Oct 26, 2018

hello,
I have some code that's heavily relying on futures and impl trait for which I have different compilation behaviours on stable (1.30) and nightly (I'm running rust on OSX, but a colleague reproduced it on Linux as well):

1.30 stable:

  • compiles in 15s in debug

1.31.0-nightly (4bd4e41 2018-10-25):

  • if compiled directly with cargo +nightly build I get the following error:
error: reached the type-length limit while instantiating `<std::vec::IntoIter<futures::future::join_all::ElemState<futures...`
  |
  = note: consider adding a `#![type_length_limit="2097152"]` attribute to your crate
  • if I add the type_length_limit attribute, it compiles in 30s
  • if I measure time for compilation passes with RUSTFLAGS="-Z time-passes" rustup run nightly cargo build:
  time: 0.034   lint checking
  time: 0.002   resolving dependency formats
    time: 0.000 write metadata
      time: 0.002       collecting roots
      time: 16.834      collecting mono items
    time: 16.836        monomorphization collection
    time: 0.031 codegen unit partitioning
    time: 0.000 write allocator module
    time: 0.000 llvm function passes [2mhp9uvb4kzbepub]
    time: 0.003 llvm module passes [2mhp9uvb4kzbepub]
    time: 0.001 llvm function passes [36y3779vszzmsrb1]
    time: 0.003 llvm module passes [36y3779vszzmsrb1]
    time: 0.267 codegen passes [2mhp9uvb4kzbepub]
    time: 0.001 llvm function passes [2nrwubyljtrub0c7]
    time: 0.002 llvm module passes [2nrwubyljtrub0c7]
    time: 0.001 llvm function passes [2mz1h59pje44dj1g]
    time: 0.003 llvm module passes [2mz1h59pje44dj1g]
    time: 0.193 codegen passes [36y3779vszzmsrb1]
    time: 0.209 codegen passes [2nrwubyljtrub0c7]
    time: 0.197 codegen passes [2mz1h59pje44dj1g]
    time: 0.002 llvm function passes [1moek2n93vgg6psh]
    time: 0.002 llvm module passes [1moek2n93vgg6psh]
    time: 0.000 llvm function passes [37ep5o26a6aq0f2a]
    time: 0.003 llvm module passes [37ep5o26a6aq0f2a]
    time: 0.176 codegen passes [37ep5o26a6aq0f2a]
    time: 0.003 llvm function passes [4cfjod4ovqous12r]
    time: 0.269 codegen passes [1moek2n93vgg6psh]
    time: 0.003 llvm module passes [4cfjod4ovqous12r]
    time: 0.001 llvm function passes [590t4nab5qyp6vss]
    time: 0.002 llvm module passes [590t4nab5qyp6vss]
    time: 0.000 llvm function passes [27my216ny6cmtwvn]
    time: 0.003 llvm module passes [27my216ny6cmtwvn]
    time: 0.193 codegen passes [590t4nab5qyp6vss]
    time: 0.177 codegen passes [27my216ny6cmtwvn]
    time: 0.307 codegen passes [4cfjod4ovqous12r]
    time: 0.000 llvm function passes [1pmi26f1ndz2bwfm]
    time: 0.002 llvm module passes [1pmi26f1ndz2bwfm]
    ...

Unfortunately, this is coming from internal code that I won't be able to share, and I'm not sure I would be able to provide a minimal reproducible case, but I could bisect nightlies since the last release. Any suggestion of which commit I should start at to speed up the process?

@estebank estebank added the I-slow Issue: Problems and improvements with respect to performance of generated code. label Oct 26, 2018
@wesleywiser wesleywiser added I-compiletime Issue: Problems and improvements with respect to compile times. and removed I-slow Issue: Problems and improvements with respect to performance of generated code. labels Oct 26, 2018
@pnkfelix pnkfelix added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 5, 2018
@nikomatsakis
Copy link
Contributor

@Geal can you https://github.com/rust-lang-nursery/cargo-bisect-rustc to try and narrow down the source of the problem?

@nikomatsakis
Copy link
Contributor

At least narrowing to a specific nightly would be great

@jonas-schievink jonas-schievink added C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc labels Aug 19, 2019
@jonas-schievink jonas-schievink added E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example regression-from-stable-to-stable Performance or correctness regression from one stable version to another. labels Jan 31, 2020
@spastorino spastorino added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Jun 3, 2020
@Dylan-DPC-zz
Copy link

@Geal just for a sanity check, is it possible to re-run this code that caused the issue and confirm whether you are still facing the issue or not? Given that both futures & your code might have changed since then and that we haven't been able to reproduce it, I don't see what we could do here.

@spastorino spastorino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Jun 10, 2020
@spastorino
Copy link
Member

spastorino commented Jun 10, 2020

Removing I-prioritize label for now, until we have a clear picture of what's going on.

@spastorino spastorino added I-prioritize Issue: Indicates that prioritization has been requested for this issue. P-medium Medium priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Jun 17, 2020
@spastorino
Copy link
Member

We would need to have a clear picture of this issue, labelling as P-medium for now.

@apiraino
Copy link
Contributor

Closing as an MCVE could not be provided

@apiraino apiraino closed this as not planned Won't fix, can't repro, duplicate, stale Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-compiletime Issue: Problems and improvements with respect to compile times. P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

9 participants