Skip to content

Very slow compilation on Elixir main #15195

@Schultzer

Description

@Schultzer

Elixir and Erlang/OTP versions

Erlang/OTP 28 [erts-16.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]

Elixir 1.20.0-rc.3 (528f8e7) (compiled with Erlang/OTP 28)

Operating system

macOS 26.3.1 (25D2128)

Current behavior

I'm seeing slow compilation on the lastet RC and main in my sql library https://github.com/elixir-dbvisor/sql.

This was not an issue in 1.20.0-rc.1-otp-28, looks like it was intruduced in 1.20.0-rc.2-otp-28

➜  sql git:(main) ✗ mix compile --force --profile time
Compiling 16 files (.ex)
[profile]     90ms compiling +      0ms waiting while compiling lib/mix/tasks/compile/sql.ex
[profile]    100ms compiling +      0ms waiting while compiling lib/application.ex
[profile]    100ms compiling +      0ms waiting while compiling lib/formatter.ex
[profile]     47ms compiling +      0ms waiting while compiling lib/token.ex
[profile]    177ms compiling +      0ms waiting while compiling lib/pool.ex
[profile]    223ms compiling +      0ms waiting while compiling lib/mix/tasks/sql.gen.test.ex
[profile]    313ms compiling +      0ms waiting while compiling lib/bnf.ex
[profile]    288ms compiling +      0ms waiting while compiling lib/sql.ex
[profile]   1033ms compiling +      0ms waiting while compiling lib/parser.ex
[profile]   8075ms compiling +      0ms waiting while compiling lib/lexer.ex
Compiling lib/format.ex (it's taking more than 10s)
Compiling lib/adapters/tds.ex (it's taking more than 10s)
Compiling lib/adapters/postgres.ex (it's taking more than 10s)
Compiling lib/adapters/mysql.ex (it's taking more than 10s)
Compiling lib/adapters/ansi.ex (it's taking more than 10s)
[profile]  20569ms compiling +    121ms waiting for module SQL.BNF while compiling lib/adapters/ansi.ex
[profile]                    |    147ms waiting for module SQL.Token while compiling lib/adapters/ansi.ex
[profile]  20784ms compiling +    118ms waiting for module SQL.BNF while compiling lib/adapters/tds.ex
[profile]                    |    139ms waiting for module SQL.Token while compiling lib/adapters/tds.ex
[profile]  21772ms compiling +    126ms waiting for module SQL.BNF while compiling lib/adapters/mysql.ex
[profile]                    |    144ms waiting for module SQL.Token while compiling lib/adapters/mysql.ex
[profile]  22850ms compiling +    116ms waiting for module SQL.BNF while compiling lib/adapters/postgres.ex
[profile]                    |    105ms waiting for module SQL.Token while compiling lib/adapters/postgres.ex
[profile] 197545ms compiling +    190ms waiting for module SQL.BNF while compiling lib/format.ex
[profile]    118ms compiling + 176890ms waiting for module SQL.Format while compiling lib/mix/tasks/sql.get.ex
[profile]                    |  12742ms waiting for module SQL.Adapters.ANSI while compiling lib/mix/tasks/sql.get.ex
[profile]                    |   7734ms waiting for module SQL.Lexer while compiling lib/mix/tasks/sql.get.ex
[profile]                    |    295ms waiting for module SQL while compiling lib/mix/tasks/sql.get.ex
[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 20 modules in 197794ms
[profile] Finished writing modules to disk in 22ms
[profile] Finished after compile callback in 483ms
Verifying SQL.Format (it's taking more than 10s)
Verifying SQL.Adapters.Postgres (it's taking more than 10s)
Verifying SQL.Adapters.MySQL (it's taking more than 10s)
Verifying SQL.Adapters.TDS (it's taking more than 10s)
Verifying SQL.Adapters.ANSI (it's taking more than 10s)
[profile] Finished group pass check of 20 modules in 291951ms
Generated sql app

Expected behavior

To compile as fast as 1.20.0-rc.1-otp-28 .

➜  sql git:(main) ✗ mix compile --force --profile time
Compiling 16 files (.ex)
[profile]     80ms compiling +      0ms waiting while compiling lib/mix/tasks/compile/sql.ex
[profile]    103ms compiling +      0ms waiting while compiling lib/application.ex
[profile]    105ms compiling +      0ms waiting while compiling lib/formatter.ex
[profile]     54ms compiling +      0ms waiting while compiling lib/token.ex
[profile]    210ms compiling +      0ms waiting while compiling lib/pool.ex
[profile]    244ms compiling +      0ms waiting while compiling lib/mix/tasks/sql.gen.test.ex
[profile]    308ms compiling +      0ms waiting while compiling lib/bnf.ex
[profile]    344ms compiling +      0ms waiting while compiling lib/sql.ex
[profile]   1094ms compiling +      0ms waiting while compiling lib/parser.ex
[profile]   1782ms compiling +    103ms waiting for module SQL.BNF while compiling lib/adapters/ansi.ex
[profile]                    |    136ms waiting for module SQL.Token while compiling lib/adapters/ansi.ex
[profile]   1941ms compiling +    105ms waiting for module SQL.BNF while compiling lib/adapters/tds.ex
[profile]                    |    134ms waiting for module SQL.Token while compiling lib/adapters/tds.ex
[profile]   4002ms compiling +    104ms waiting for module SQL.BNF while compiling lib/adapters/mysql.ex
[profile]                    |    135ms waiting for module SQL.Token while compiling lib/adapters/mysql.ex
[profile]   4669ms compiling +    104ms waiting for module SQL.BNF while compiling lib/adapters/postgres.ex
[profile]                    |    104ms waiting for module SQL.Token while compiling lib/adapters/postgres.ex
[profile]   5335ms compiling +    211ms waiting for module SQL.BNF while compiling lib/format.ex
[profile]   8217ms compiling +      0ms waiting while compiling lib/lexer.ex
[profile]    104ms compiling +   7806ms waiting for module SQL.Lexer while compiling lib/mix/tasks/sql.get.ex
[profile]                    |    344ms waiting for module SQL while compiling lib/mix/tasks/sql.get.ex
[profile] Finished cycle resolution in 0ms
[profile] Finished compilation cycle of 20 modules in 8262ms
[profile] Finished writing modules to disk in 44ms
[profile] Finished after compile callback in 274ms
[profile] Finished group pass check of 20 modules in 172ms
Generated sql app

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions