~/talk

A Journey into Node.js Internals

Talkat iJS 2018 Spring · 2018-04-11..04-13· [nodejs]
slides:none on file

Claims that Node.js is single threaded are false; the platform runs an event loop phases thread plus a bounded worker thread pool (libuv) that offloads blocking work. Uses --prof and --prof-process to show synchronous crypto cost ~4,000 CPU ticks versus asynchronous ~130, and a demo where a heterogeneous array costs ~900 ms versus a homogeneous one ~12 ms. Explains V8 pipeline (Ignition, Turbofan), generational GC (scavenge and mark‑sweep), and finds a listener memory leak with chrome://inspect heap snapshots.

AI-written summary · about

  1. 0:00Intro
  2. 1:02Tamar Twena-Stern
  3. 2:57Traditional Approach - Blocking 10
  4. 4:19Problems
  5. 5:43Node.js Architecture - High Level
  6. 10:21Is Worker Thread Pool Implemented With A Queue ?
  7. 11:15Event Loop Implemented With A Queue ?
  8. 12:32The Event Loop Thread Deep Dive
  9. 14:13Timers Phase
  10. 15:241/0 Callback Phase (Error)
  11. 16:08Poll Phase - Most Importent
  12. 17:41Check Phase And Close Phase
  13. 25:42V8 Engine
  14. 26:12V8 Architecture
  15. 27:14What Is Just-In-Time Compilation ?
  16. 27:55JIT Compiler In Java
  17. 29:01Ignition Interpreter
  18. 29:24Turbofan Compiler - JIT
  19. 29:35How To Help Turbofan Optimise Hot Code?
  20. 36:21Optimisation And De-optimisation
  21. 37:17V8 Memory Management
  22. 38:11V8 Memory Structure
  23. 38:40The Stack And The Heap
  24. 39:46The Heap Structure
  25. 40:24Object Life On The Heap
  26. 40:50Heap New Space - Scavenge Scan
  27. 41:51Heap Old Space - Mark Sweep Demonstration
  28. 42:17Mark Sweep - DFS
~/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.