~/talk

Flattening Recursion with Fibers

Talkat RubyConf 2024 · 2024-11-13..11-15· [ruby]
slides:none on file

Uses Ruby fibers to linearize nested around-callbacks in Mongoid by creating a fiber per embedded child and resuming them in sequence so the before yield after ordering stays correct. Demonstrates avoiding a SystemStackError on records with thousands (1,000s to 10,000s) of embedded documents, moves per-frame allocation from stack to heap, and integrates the proof‑of‑concept into run callbacks inside mongoid where it successfully prevents stack overflow while shifting memory pressure to the heap.

AI-written summary · about

  1. 0:00Introduction
  2. 1:25Recursive monster
  3. 10:37Linear solution quest
  4. 19:31Fibers to vanquish
  5. 22:21Q&A
~/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.