~/talk

Tidying Active Record Allocations

Talkat EuRuKo 2019 · 2019-06-21..06-22· [ruby, web-performance]
slides:none on file

Uses memory_profiler and derailed benchmarks against CodeTriage to find ActiveRecord allocation hotspots, then patches two real hotspots: replace per-call symbol-to-string conversion in respond_to with a symbol-keyed hash (avoids array iteration) and avoid string→Time→string roundtrip when building cache keys by reformatting the DB string directly. The patches cut total allocations ~1% and ~5%, give ~1.01x and ~1.12x request speedups respectively, and combine to ~1.23x faster overall (about 19 fewer servers).

AI-written summary · about

  1. 0:00Intro
  2. 1:00Welcome
  3. 1:55Backstory
  4. 7:40Performance Quiz
  5. 11:30Memory Profiler
  6. 12:30Code Triage
  7. 15:30Thank You Code
  8. 16:20Results
  9. 17:20Benchmarks
  10. 18:20Ttest
  11. 20:20Zoom in
  12. 21:00What does it even do
  13. 22:30Debugging
  14. 24:25Is it useful
  15. 26:00Conclusion
~/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.