~/talk

Analyze the JS Heap and detect Memory Leaks

Talkat Conf42 JavaScript 2023 · on Thursday, 2023-11-16· [web-platform, javascript]
slides:none on file

Shows how to find real leaks: use Chrome DevTools Memory tab to take a heap snapshot, inspect retain size and the retainers list to see what keeps objects alive, trigger GC manually, and watch the Performance Monitor for a stair‑step JS heap, DOM nodes and event listeners rising (examples show tens of MBs, thousands of nodes, hundreds of listeners). Demonstrates Edge’s detached elements tool to map detached DOM nodes to the source and fixes a leak by storing the handler and calling removeEventListener.

AI-written summary · about

  1. 0:00intro
  2. 0:22preamble
  3. 1:04about julian
  4. 2:00immutability
  5. 2:23dom nodes
  6. 2:37composition layers
  7. 3:15inspect dom & javascript memory
  8. 3:30birdseye view
  9. 4:56memory heap
  10. 5:47object sizes
  11. 7:00inspect dom & javascript memory
  12. 9:38demo 1
  13. 11:42what consumes memory
  14. 12:05composition layers
  15. 13:23layer inspection
  16. 14:28demo 2
  17. 16:43memory leaks
  18. 18:55console.log
  19. 19:37global variables
  20. 20:13left over callbacks / subscriptions
  21. 21:12dom references
  22. 21:49how to detect memory leaks?
  23. 22:07detect memory leaks
  24. 23:09don't forget to trigger GC
  25. 23:43in-depth analysis - detect memory leaks
  26. 24:33detached elements tools
  27. 26:56demo 3
  28. 34:12thanks for your time!
~/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.