How to Load 1m Lines of Ruby in 5s
summary
Claims reducing cold boot from 35s to 5s by statically analysing a multi‑million‑line Ruby monorepo and generating an autoloader build daemon. Process parses files into an AST, stores metadata in sqlite, resolves nesting and ancestors, preloads gems when static analysis fails, and bans hard‑to‑analyse patterns with rubocop. Outcome includes removing require_relative, a selective test executor that runs <5% of tests for ~25% of CI runs, and codegen hooks to replace metaprogramming and preload production paths.
AI-written summary · about
chapters (19)
- 0:00Intro
- 1:20The Problem
- 2:18Synthetic Benchmark
- 4:27How to Load Fast
- 5:24Autoloader
- 9:46Nesting
- 10:46Ancestors
- 11:23Rough Sketch
- 13:58Nesting Example
- 14:36Child Resolving Example
- 15:31Edge Cases
- 16:39AutoLoad
- 19:28Required Files
- 21:06Autoloader Issues
- 21:42Reopening Classes
- 23:52What do we use it for
- 25:31Project Untangling
- 27:36Future Plans
- 28:14Conclusion








