~/talk

A Journey into Node.js Internals

Talkat iJS London 2019 · 2019-05-13..05-15· [nodejs, javascript]
slides:none on file

Node.js is not single threaded the event loop is single threaded while the platform uses a libuv worker thread pool implemented as a queue and several explicit event-loop phases. Synchronous crypto hashes cost about 4000 CPU ticks → 130 CPU ticks when converted to async. A heterogeneous array insertion shows 900ms vs 12ms compared with a homogeneous one, demonstrating JIT assumptions and deoptimization. Generational GC uses scavenge and mark sweep, GC pauses are real, and heap snapshots via --inspect reveal listener-driven memory leaks.

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.