marcandre
Compilation time for our project degraded from ~26 seconds to ~32 seconds (~23% slower)
.
Did anyone else compare compilation performance on their project?
$ time mix compile --force && elixir -v
Compiling 1397 files (.ex)
Generating Enaia.Cldr for 2 locales named [:en, :und] with a default locale named :en
Generated enaia app
real 0m25.922s
user 1m59.042s
sys 0m16.722s
Erlang/OTP 27 [erts-15.2.7.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]
Elixir 1.18.4 (compiled with Erlang/OTP 27)
time mix compile --force && elixir -v
Compiling 1397 files (.ex)
Generating Enaia.Cldr for 2 locales named [:en, :und] with a default locale named :en
Generated enaia app
real 0m32.299s
user 2m48.014s
sys 0m20.359s
Erlang/OTP 28 [erts-16.1.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]
Elixir 1.19.1 (compiled with Erlang/OTP 28)
Trending in Discussions
Hey there,
It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hi there! :wave:
@frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
I’ve been using Emacs as my main code editor for more than a two years. It’s a custom build version although I’ve tried doom emacs and sp...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
vanderhoop
The compiler is definitely doing more work overall in 1.19.X, so make sure you’re leveraging the
MIX_OS_DEPS_COMPILE_PARTITION_COUNTenv var, described here: elixir/CHANGELOG.md at v1.19 · elixir-lang/elixir · GitHubIf the compilation is still longer overall after setting that value to around half your cores, I’d open a bug, as I don’t think that’s expected.
vanderhoop
Also, you’re the
!
freedom_formatterguy! Thanks for the trailing commasjosevalim
Can you try with the —profile time option to
mix compile? I am suspecting a type system related slowdown (you can also try v1.19 branch, we just pushed more optimizations).marcandre
Thanks. Unfortunately specifying
MIX_OS_DEPS_COMPILE_PARTITION_COUNT=2didn’t noticeably change the results.marcandre
Thanks @josevalim . I’m not sure what to look for when using
. What can I do to help figure out the source of the slowdown? Do I need the output from 1.18 and what would I compare?
–profile time… There’s a lot of outputjosevalim
Wait a second. Compilation took 21s but the Mix task took 33s?! Try running “mix compile —force” with MIX_DEBUG=1 and see which task is taking long.
marcandre
Right. There’s a sizeable delay that doesn’t have any output, even with MIX_DEBUG=1:
josevalim
Ok, good news is that it is not compiler related, bad news is that we don’t have instrumentation around the areas that are slow now.
When does the delay happen? Before it starts compiling each module? In the middle? At the end? My suggestion is to add some print statements around mix/compilers/elixir.ex and try to get a feeling where in the code the slowdown is.
marcandre
Paying more attention to it, the mysterious delay is after the “compilation cycle” and before the “group pass check”:
Is this when the type checking is happening?
josevalim
No. I have a hunch this is protocol consolidation. If you open up mix/compilers/elixir.ex, you will see each_cycle and after_compile callbacks, measure those!