-
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
very slow compiles on large ADT with pattern matches #14224
Comments
This is still happening on 3.3.1. Here are the files that emit the (false) warnings, and the warnings, although it is unclear if they are responsible for the slow compilation time because I can't find a Scala 3 port of |
I had a look at this, and the slowness is in typer, not in the match analysis, using I also looked at the false warning, and am dealing with that part in #18616. |
Compiler version
3.1.0
Minimized code
https://gitlab.com/fommil/shapely
(the code is generated and found in the
src_managed
folder after running this command)A previous version of one of the slower files would crash the JVM even with 8GB of RAM so I gave up and refactored the code to use
.asInstanceOf
instead of explicit pattern matching.Expectation
This codebase compiles in seconds on Scala 2.13, but takes minutes in Scala 3. I would expect it to have competitive performance with Scala 2.
This code is mostly pattern matching and subtyping calculations. Although the
implicit
keyword appears a lot, there's not actually any implicit resolution happening here.The text was updated successfully, but these errors were encountered: