~/talk

How to load 1m lines of Ruby in 5s

Talkat RubyConf 2017 · 2017-11-15..11-17· [ruby, developer-experience]
slides:none on file

Claims 1m lines can boot in 5s instead of 35s by replacing broad requires with an autoloader backed by static analysis. The pipeline parses files with the parser gem, builds a definition tree, writes autoload stubs, stores caches in SQLite, and resolves constants (nesting + ancestry) while requiring gems and using const_get for unknowns. Migration bans const_set, ObjectSpace and class reopenings enforced by Rubocops; packages are enforced via packages.yaml. CI uses the dependency graph to run far fewer tests (25% of runs run <5% of tests).

AI-written summary · about

  1. 0:00Intro
  2. 1:05The big challenge
  3. 2:00Ruby is slow
  4. 4:13Simple example
  5. 5:08Ruby Autoloader
  6. 6:37Static Analysis
  7. 9:48Nesting
  8. 11:32Ancestry
  9. 12:16Example
  10. 13:34Putting the pieces together
  11. 16:25Making it safe
  12. 16:46Autoloader problems
  13. 18:55Autoloader stub
  14. 23:03Reopening classes
  15. 25:31Selective test execution
  16. 26:30The Gordian knot
  17. 27:30Packages
  18. 28:32Typechecking
  19. 29:11Conclusion
~/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.