~/talk

Why Is My LiveView Slow and What Can I Do About It

Talkat ElixirConf EU 2022 · 2022-06-09..06-10· [web-performance]
links:none on file
slides:none on file

An internal QA deploy UI built on LiveView becomes slow once the dataset grows: the backend keeps sending big diffs while the front-end JS cannot update the DOM fast enough. Use Chrome DevTools (Network websocket messages, Performance tab, Task Manager) to prove it: websocket messages include entire list (1,000 items → ~35,000 byte payloads), front-end work grows and falls behind, and a demo at speedy.fly.dev shows reconnections; switching to live components reduce payload to a third and adding paginate or show fewer elements fixes the lag; heartbeat defaults to 30,000 ms and debounce/aggregation also help.

AI-written summary · about

  1. 0:00LiveView performance problem
  2. 1:47Root cause of slowness
  3. 3:55LiveView as JavaScript app
  4. 5:00Live demo setup
  5. 9:42Chrome DevTools debugging
  6. 12:10Live components for updates
  7. 14:41Paginating large lists
  8. 18:15CPU analysis with Task Manager
  9. 20:23Heartbeat interval tuning
  10. 24:24Call stack analysis
  11. 27:34Debugging techniques summary
  12. 30:07Real-time page debouncing
  13. 32:14Heartbeat configuration
  14. 33:56GenServer broadcasting
  15. 35:00LiveView future
  16. 36:54Q&A on lazy rendering
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.