$ the-wire · showcase
StringIO drops UTF-8 re-encoding, LiveView fixes unload and upload locks
By RepoJournal · Filed · About Elixir & Phoenix · Composed from the cited sources · methodology
Elixir's StringIO stops re-encoding binaries on every read, and LiveView lands three fixes for auto-upload locking, form target handling, and morphdom.
Avoid UTF-8 re-encoding in StringIO character reads elixir-lang/elixir
StringIO's character reads no longer re-encode the binary into the accumulator, which the author measured at x1.2-1.3 speedup with no regression and lower memory use. Barna Kovacs writes that local benchmarks over multiple input types, "asian strings" included, "it's all the same outcome."
Avoid UTF-8 re-encoding in StringIO line reads (#15957) elixir-lang/elixir
The same treatment now applies to line reads: StringIO carries the original input byte size while scanning and derives the consumed size from the remaining suffix, so it no longer re-encodes UTF-8 on every read_line. Both changes land in a single pass over the same code path.
Wait for all ancestor locks before auto-upload phoenixframework/phoenix_live_view
Auto-upload could fire while a file input sat nested inside a locked ancestor, because onUnlock waited only for the nearest lock. The fix rechecks after each unlock and starts the callback only once the whole ancestor chain is unlocked, ignoring bubbling unlock events from other elements.
Fix LiveView unload for submitter formtarget phoenixframework/phoenix_live_view
DOM.isUnloadableFormSubmit checked only the form's target and never the submitter's formtarget, so a form submit with formtarget="_blank" still ran unload() in the original tab, destroying LiveViews and disconnecting it while the browser opened the response elsewhere.
Update morphdom phoenixframework/phoenix_live_view
LiveView bumped morphdom to pick up a fix for issue 4456. The remaining changes were routine: Phoenix dropped a flex-column class that was never a Tailwind class and had no effect, and both repos took brace-expansion dependency bumps.