Event Loop, Memory & Instant Navigation

Connect task queues, V8 shapes, event dispatch, and signals to instant bfcache.

5 concepts · 21 min

  1. Step 1Not explored

    Event Loop, Macrotasks, and Microtask Queue

    Prevent 60fps frame starvation and Promise-loop freezes—the Event Loop drains the entire Microtask Queue after every single macrotask before painting.

  2. Step 2Not explored

    V8 Hidden Classes (Shapes) and Inline Caches

    Internal descriptors (Maps/Shapes) generated by JS engines to read object properties at fixed memory offsets instead of hash-table lookups.

  3. Step 3Not explored

    DOM Event Propagation (Capture, Target, Bubble)

    Three-phase DOM event traversal from window to target and back, enabling single-listener delegation on common ancestors.

  4. Step 4Not explored

    Back/Forward Cache (bfcache)

    In-memory cache snapshotting the full JS heap and DOM tree on outbound navigation to restore the page instantaneously on Back/Forward.

  5. Step 5Not explored

    Signals and Fine-Grained Reactivity (Reactive Graph)

    Reactive model built on a directed acyclic dependency graph (Signal, Computed, Effect) updating only subscribed DOM nodes without virtual tree diffing.