Elixir Compile Time Dependencies and Improvement Tips

244
clicks
Elixir Compile Time Dependencies and Improvement Tips

Source: youtube.com

Type: Video

The talk by Tim Gent at ElixirConf EU 2023 covers the common issues developers face with slow compile times in Elixir. Gent elucidates the distinction between runtime and compile-time dependencies in Elixir code, explaining that code executed at compile time is outside function bodies, while runtime code is within function bodies. He emphasizes understanding the Elixir compiler's decision-making process regarding recompilations after code updates. To address the main concern, Gent provides insights into transitive compile-time dependencies, revealing how changes in a module indirectly affect the need to recompile connected modules. Gent also presents an interactive quiz to solidify the viewers’ understanding of the dependency concepts he explains, including direct and transitive compile-time dependencies, export dependencies, and the implications of runtime dependencies on modules with compile-time dependencies. Throughout the talk, he offers advice on how to refactor code for reduced compile times, such as isolating modules with compile-time dependencies and profiling compile times to identify key issues. The presentation concludes with a Q&A session, wherein Gent provides additional practical examples and shares the impact of his tips on reducing compilation time in his professional experience.

© HashMerge 2024