The Wire · Showcase
URI ENCODING GETS 10X SPEEDUP AS PHOENIX PATCHES BOOT CRASH
By RepoJournal · Filed · About Elixir & Phoenix
Elixir landed a massive optimization for URL encoding that hits 10x gains on empty strings, while Phoenix 1.8.11 fixes a critical startup failure.
The biggest move is a URI encoding rewrite [1] that rewrites the loop behind encode_www_form/1 and RFC 3986 query encoding, delivering dramatic speedups across the board. On an M4 Mac, empty string encoding jumped from 63.9 to 6.3 microseconds (10.15x faster), and larger payloads saw 3x to 5x improvements. The optimization splits cleanly from a proposed SWAR fast path, meaning this is the conservative win you deploy without hesitation. Meanwhile, Phoenix 1.8.11 [5] shipped a critical fix for the framework crashing on boot when Mix is available but not started, the kind of edge case that breaks CI pipelines. On the Elixir side, two bug fixes landed: struct error messages now format consistently when you pass non-atom keys [2], and Task.yield_many/2 no longer hangs when the :limit parameter exceeds the actual task count [3]. A smaller EEx optimization also landed to speed up fn block detection by scanning tokens in reverse [4].
One email a day. Unsubscribe in one click.
Keep up with Elixir & Phoenix in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Upgrade to Phoenix 1.8.11 before next deploy if you use Mix-based apps phoenixframework/phoenix [immediate]
- → Test URI encoding paths with latest Elixir to validate 10x gains elixir-lang/elixir [plan]
- → Review Task.yield_many calls with :limit; ensure limit does not exceed task count elixir-lang/elixir [monitor]
References
- [1] Optimize URI.encode_www_form/1 and RFC 3986 query encoding ↗ elixir-lang/elixir
- [2] Fix struct key malformed error message ↗ elixir-lang/elixir
- [3] Fix Task.yield_many/2 waits too long or forever when :limit exceeds task count (#15737) elixir-lang/elixir
- [4] Optimize EEx fn block detection ↗ elixir-lang/elixir
- [5] v1.8.11 ↗ phoenixframework/phoenix