Skip to content

Slow performance compiling project using Scala 3 (20x slower than 2.13) #15945

Closed
@OndrejSpanel

Description

@OndrejSpanel

Compiler version

3.2.1-RC1-bin-20220829-63344e7-NIGHTLY

Minimized code

I do not have one yet. I experience the issue in a close source project, a few thousands of lines of code.

Output

compiling 388 Scala sources and 5 Java sources to C:\Dev\tempi\target\scala-3.2.1-RC1-bin-20220829-63344e7-NIGHTLY\classes ...
Total time: 705 s (11:45), completed 1. 9. 2022 15:00:43

The project takes very long to compile (~10 minutes).

Expectation

The same project compiles about 30 seconds

Notes

I have attached VisualVM to the process and performed CPU sampling. I have seen a lot of time (almost all) in following functions:

dotty.tools.dotc.util.SimpleIdentityMap$MapMore.apply ()
dotty.tools.dotc.core.OrderingConstraint$$anon$1.entries()
dotty.tools.dotc.core.OrderingConstraint$anon$3.entries()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions