Listen "60: Compile Faster with Marc-André Lafortune"
Episode Synopsis
We talk with Marc-André Lafortune about reducing Elixir project compile times. On larger projects, when a single file like a view template is changed and over 100 files get recompiled, there is something wrong. Marc-André explains how he identified the problems in his project and contributed to Elixir’s mix xref tool making it easier for us to find those problems in our own projects! We cover how these tooling improvements were used to improve the upcoming Phoenix 1.6 and Elixir 1.13! An additional mix xref flag was added to run CI checks on our code to prevent accidentally adding code that slows our compile times.
Show Notes online - http://podcast.thinkingelixir.com/60 (http://podcast.thinkingelixir.com/60)
Elixir Community News
- https://insights.stackoverflow.com/survey/2021#most-loved-dreaded-and-wanted-language-love-dread (https://insights.stackoverflow.com/survey/2021#most-loved-dreaded-and-wanted-language-love-dread) – Elixir is number 4 among the "most loved" languages on Stack Overflow's developer survey
- https://insights.stackoverflow.com/survey/2021#section-top-paying-technologies-top-paying-technologies (https://insights.stackoverflow.com/survey/2021#section-top-paying-technologies-top-paying-technologies) – Elixir is number 3 in highest paid languages on Stack Overflow's developer survey
- https://github.com/nvim-treesitter/nvim-treesitter/pull/1645 (https://github.com/nvim-treesitter/nvim-treesitter/pull/1645) – Neovim adds tree-sitter (a syntax parser) support for the Surface library
- https://github.com/surface-ui/surface_tailwind/issues/1#issuecomment-884981076 (https://github.com/surface-ui/surface_tailwind/issues/1#issuecomment-884981076) – Surface Catalogue to continue and may redesign the UI using TailwindCSS
- https://github.com/phoenixframework/phoenix/issues/4403#issuecomment-895354673 (https://github.com/phoenixframework/phoenix/issues/4403#issuecomment-895354673) – Phoenix 1.6 possibly released this week?
Do you have some Elixir news to share? Tell us at @ThinkingElixir (https://twitter.com/ThinkingElixir) or email at [email protected] (mailto:[email protected])
Discussion Resources
- https://twitter.com/josevalim/status/1421912595456569351 (https://twitter.com/josevalim/status/1421912595456569351) – Thread talks about the change
- https://groups.google.com/g/elixir-lang-core/c/Hmg5y8S3v4E/m/FVK50RWBAQAJ?pli=1 (https://groups.google.com/g/elixir-lang-core/c/Hmg5y8S3v4E/m/FVK50RWBAQAJ?pli=1) – Elixir core mailing list where feature was discussed
- https://hexdocs.pm/mix/master/Mix.Tasks.Xref.html#module-understanding-the-printed-graph (https://hexdocs.pm/mix/master/Mix.Tasks.Xref.html#module-understanding-the-printed-graph)
- https://github.com/elixir-lang/elixir/pull/11044 (https://github.com/elixir-lang/elixir/pull/11044) – Add "--label compile-connected" option to mix xref graph
- https://github.com/elixir-lang/elixir/pull/11048 (https://github.com/elixir-lang/elixir/pull/11048) – Add "--fail-above" option to mix xref making it good for CI systems
- https://github.com/elixir-lang/elixir/pull/11049 (https://github.com/elixir-lang/elixir/pull/11049) – Support multiple sinks and sources in mix xref graph
- https://github.com/elixir-lang/elixir/pull/11162 (https://github.com/elixir-lang/elixir/pull/11162) – Update docs
- https://github.com/elixir-lang/elixir/pull/11080 (https://github.com/elixir-lang/elixir/pull/11080) – Rely on modification time and hash to determine modified sources
- https://dashbit.co/blog/speeding-up-re-compilation-of-elixir-projects (https://dashbit.co/blog/speeding-up-re-compilation-of-elixir-projects) – Blog post on recompilations
- https://github.com/phoenixframework/phoenix/issues/4408 (https://github.com/phoenixframework/phoenix/issues/4408) – Example 1 of sneaky macros introducing compile-time dependencies
- https://github.com/phoenixframework/phoenix/issues/4409 (https://github.com/phoenixframework/phoenix/issues/4409) – Example 2 of sneaky macros introducing compile-time dependencies
- https://exercism.io/tracks/elixir (https://exercism.io/tracks/elixir)
- https://github.com/rbenv/rbenv (https://github.com/rbenv/rbenv)
- https://rvm.io/ (https://rvm.io/)
- https://www.super.mx/ (https://www.super.mx/)
- https://xkcd.com/303/ (https://xkcd.com/303/)
- --label compile-connected
- --fail-above
Guest Information
- https://twitter.com/malafortune (https://twitter.com/malafortune) – on Twitter
- https://github.com/marcandre/ (https://github.com/marcandre/) – on Github
- http://blog.marc-andre.ca/ (http://blog.marc-andre.ca/) – Blog
Find us online
- Message the show - @ThinkingElixir (https://twitter.com/ThinkingElixir)
- Email the show - [email protected] (mailto:[email protected])
- Mark Ericksen - @brainlid (https://twitter.com/brainlid)
- David Bernheisel - @bernheisel (https://twitter.com/bernheisel)
- Cade Ward - @cadebward (https://twitter.com/cadebward)
Show Notes online - http://podcast.thinkingelixir.com/60 (http://podcast.thinkingelixir.com/60)
Elixir Community News
- https://insights.stackoverflow.com/survey/2021#most-loved-dreaded-and-wanted-language-love-dread (https://insights.stackoverflow.com/survey/2021#most-loved-dreaded-and-wanted-language-love-dread) – Elixir is number 4 among the "most loved" languages on Stack Overflow's developer survey
- https://insights.stackoverflow.com/survey/2021#section-top-paying-technologies-top-paying-technologies (https://insights.stackoverflow.com/survey/2021#section-top-paying-technologies-top-paying-technologies) – Elixir is number 3 in highest paid languages on Stack Overflow's developer survey
- https://github.com/nvim-treesitter/nvim-treesitter/pull/1645 (https://github.com/nvim-treesitter/nvim-treesitter/pull/1645) – Neovim adds tree-sitter (a syntax parser) support for the Surface library
- https://github.com/surface-ui/surface_tailwind/issues/1#issuecomment-884981076 (https://github.com/surface-ui/surface_tailwind/issues/1#issuecomment-884981076) – Surface Catalogue to continue and may redesign the UI using TailwindCSS
- https://github.com/phoenixframework/phoenix/issues/4403#issuecomment-895354673 (https://github.com/phoenixframework/phoenix/issues/4403#issuecomment-895354673) – Phoenix 1.6 possibly released this week?
Do you have some Elixir news to share? Tell us at @ThinkingElixir (https://twitter.com/ThinkingElixir) or email at [email protected] (mailto:[email protected])
Discussion Resources
- https://twitter.com/josevalim/status/1421912595456569351 (https://twitter.com/josevalim/status/1421912595456569351) – Thread talks about the change
- https://groups.google.com/g/elixir-lang-core/c/Hmg5y8S3v4E/m/FVK50RWBAQAJ?pli=1 (https://groups.google.com/g/elixir-lang-core/c/Hmg5y8S3v4E/m/FVK50RWBAQAJ?pli=1) – Elixir core mailing list where feature was discussed
- https://hexdocs.pm/mix/master/Mix.Tasks.Xref.html#module-understanding-the-printed-graph (https://hexdocs.pm/mix/master/Mix.Tasks.Xref.html#module-understanding-the-printed-graph)
- https://github.com/elixir-lang/elixir/pull/11044 (https://github.com/elixir-lang/elixir/pull/11044) – Add "--label compile-connected" option to mix xref graph
- https://github.com/elixir-lang/elixir/pull/11048 (https://github.com/elixir-lang/elixir/pull/11048) – Add "--fail-above" option to mix xref making it good for CI systems
- https://github.com/elixir-lang/elixir/pull/11049 (https://github.com/elixir-lang/elixir/pull/11049) – Support multiple sinks and sources in mix xref graph
- https://github.com/elixir-lang/elixir/pull/11162 (https://github.com/elixir-lang/elixir/pull/11162) – Update docs
- https://github.com/elixir-lang/elixir/pull/11080 (https://github.com/elixir-lang/elixir/pull/11080) – Rely on modification time and hash to determine modified sources
- https://dashbit.co/blog/speeding-up-re-compilation-of-elixir-projects (https://dashbit.co/blog/speeding-up-re-compilation-of-elixir-projects) – Blog post on recompilations
- https://github.com/phoenixframework/phoenix/issues/4408 (https://github.com/phoenixframework/phoenix/issues/4408) – Example 1 of sneaky macros introducing compile-time dependencies
- https://github.com/phoenixframework/phoenix/issues/4409 (https://github.com/phoenixframework/phoenix/issues/4409) – Example 2 of sneaky macros introducing compile-time dependencies
- https://exercism.io/tracks/elixir (https://exercism.io/tracks/elixir)
- https://github.com/rbenv/rbenv (https://github.com/rbenv/rbenv)
- https://rvm.io/ (https://rvm.io/)
- https://www.super.mx/ (https://www.super.mx/)
- https://xkcd.com/303/ (https://xkcd.com/303/)
- --label compile-connected
- --fail-above
Guest Information
- https://twitter.com/malafortune (https://twitter.com/malafortune) – on Twitter
- https://github.com/marcandre/ (https://github.com/marcandre/) – on Github
- http://blog.marc-andre.ca/ (http://blog.marc-andre.ca/) – Blog
Find us online
- Message the show - @ThinkingElixir (https://twitter.com/ThinkingElixir)
- Email the show - [email protected] (mailto:[email protected])
- Mark Ericksen - @brainlid (https://twitter.com/brainlid)
- David Bernheisel - @bernheisel (https://twitter.com/bernheisel)
- Cade Ward - @cadebward (https://twitter.com/cadebward)
More episodes of the podcast Thinking Elixir Podcast
283: Erlang Turns 27 and React at Risk
16/12/2025
282: Type Systems and View Transitions
09/12/2025
281: Planning for the Unexpected
02/12/2025
280: Dark Matter Developers
25/11/2025
279: Hot Code Upgrades and Hotter AI Takes
18/11/2025
278: WAL-ing Through Database Changes
11/11/2025
277: Searching Across the Hexiverse
04/11/2025
276: Elixir v1.19 Types and Speed
28/10/2025
275: From Slop to Success?
21/10/2025
274: Protocols, Permissions, and Performance
14/10/2025
ZARZA We are Zarza, the prestigious firm behind major projects in information technology.