-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
~5x compilation slowdown compared to 2.13 on ~400 files #20217
Comments
The slowdown seems to be similar to the one observed in #20120, maybe these 2 are related |
Here are It seems about typing the |
I don't think it made a difference unfortunately:
|
Due to the differences in the implicit search approach, the compile time in Scala 3 is expected to differ from Scala 2. If we could create a minimal example with one implicit definition that clearly takes longer to compile, we can then identify potential improvements. CC @Gedochao |
The fact that the repro is large is deceptive : the code shared by @keynmol is a repetition of the exact same implicit pattern across a great many files/classes. Running a profiler (like yourkit) on the compilation of that project should allow for precisely pinpointing possible areas of improvement, and profiling the compiler would likely be more difficult on a minified repro that would contain a single occurrence of the implicit. |
The core issue is: during I tried to cache some result of cc @odersky |
If it helps, maybe we should do what you tried: cache in |
Should I see an improvement in 3.6.0-RC1-bin-20240922-22ed2fb-NIGHTLY (from yesterday?) given PR was merged 5 days ago.
|
I don't see much difference on my laptop:
But here's something fascinating - on Github's ubuntu runners the difference between 2.13 and Scala 3 is "only" 2x! https://github.com/keynmol/smithy4s-aws-only/actions/runs/10997520261 I have no idea why my Apple M2 laptop is affected by this so much... |
I have created this repository by removing most of the dependencies and plugins: https://github.com/keynmol/smithy4s-aws-only
It contains ~428 Scala files.
You can switch Scala version using environment variable:
I'm observing consistent 5x slowdown compared to 2.13 - the code doesn't change (no codegenerators).
Minimising it further would be difficult, as this difference is most pronounced on this relatively large amount of files.
The text was updated successfully, but these errors were encountered: