The Wire · Showcase
ELIXIR CUTS EXPONENTIAL GROWTH IN BDD INTERSECTIONS, PHOENIX LIVE VIEW SKIPS CLONES ON STABLE LISTS
By RepoJournal · Filed · About Elixir & Phoenix
The compiler just got smarter about preventing exponential blowup in type intersection logic, while Phoenix Live View stops wastefully copying keyed comprehensions that aren't moving.
Elixir's BDD intersection optimizer [1] now preserves shared unions only when absorption removes all residual terms, normalizing other equal-head intersections eagerly to prevent the exponential growth that was crushing compile times on complex types. This is a quiet but significant win for anyone working with heavy union logic. On the Phoenix side, Live View [2] [3] clones keyed state only when a diff actually moves entries now, letting stable-position updates merge in place instead of copying the entire cached render tree. The payoff is real: you skip the clone operation entirely when list items stay put, which matters in high-frequency list updates. Meanwhile, IEx got two fixes to stop reporting garbage memory numbers in process_info [4] and to handle module reloads correctly when multiple modules live in the same file . The :pid info assertion removal [5] cleans up test noise upstream.
Action items
- → Merge the BDD intersection fix into your build pipeline if you maintain type-heavy libraries elixir-lang/elixir [plan]
- → Pull the Phoenix Live View keyed comprehension optimization before your next release phoenixframework/phoenix_live_view [plan]
- → Update IEx if you've been troubleshooting memory with process_info elixir-lang/elixir [monitor]
References
- [1] Optimize equal-head BDD intersections elixir-lang/elixir
- [2] Avoid cloning keyed comprehensions without moves ↗ phoenixframework/phoenix_live_view
- [3] Avoid cloning keyed comprehensions without moves (#4328) phoenixframework/phoenix_live_view
- [4] Fix IEx.Helpers.process_info/1 heap and stack memory calculation (#15628) elixir-lang/elixir
- [5] Remove :pid from info assertions elixir-lang/elixir