$ the-wire · showcase
String.chunk gets a zero-copy fast path, LiveView uploads stop swallowing chunk timeouts
By RepoJournal · Filed · About Elixir & Phoenix · Composed from the cited sources · methodology
Two core libraries tightened the same kind of edge: Elixir's String.chunk stops allocating on uniform input, and Phoenix LiveView's client now fails fast when a chunk upload stalls.
Optimize String.chunk with uniform fast-path and sub-binary slicing elixir-lang/elixir
String.chunk now returns [string] immediately for fully valid and printable inputs, skipping the chunk loop and its allocations, and the fallback loop reuses the first decoded codepoint and classification instead of decoding twice. Inside that loop, repeated <> concatenation is replaced by zero-copy sub-binary slicing via binary_part/3, so chunking a large string no longer builds intermediate b...
Handle chunk push timeouts in uploads phoenixframework/phoenix_live_view
pushChunk gains the client timeout handling it was missing. Previously a slow chunk upload swallowed the client-side timeout and left the upload waiting on the server timeout, which only fires when Phoenix.LiveView.UploadChannel closes the socket, so a stalled upload hung far longer than the client intended.
Update assets phoenixframework/phoenix_live_view
The packaged JavaScript assets for phoenix_live_view were rebuilt, so the client-side changes above reach anything loading LiveView from the compiled asset bundle rather than vendoring the source.