~/talk

Fixing Performance & Memory problems

Talkat RubyConf 2019 · 2019-11-18..11-20· [ruby]
slides:none on file

Shows concrete fixes: use Ruby-Prof to find an N^2 hotspot in scale_factor that calls abs a quarter‑million times and get several hundredfold speedup; use low‑overhead Stackprof for production sampling; use rbtrace + ObjectSpace and write a heap dump then analyze with heapy to find millions of leaked compiled template methods created with random names inside per‑request view resolvers, a leak that exhausts memory in ~2 weeks on instances serving ~3M requests/day.

AI-written summary · about

  1. 0:00Intro
  2. 0:36Realtime recommender
  3. 4:35Ruby-Prof is a profiler
  4. 9:53Sampling profilers
  5. 11:02Stackprof
  6. 11:39Overhead
  7. 12:22Part 1 Summary
  8. 16:56Leaks are scary because
  9. 18:23At least a year
  10. 19:58What could be happening?
  11. 21:49trace_object_allocations
  12. 22:19The plan
  13. 22:53Start Tracing
  14. 27:292 Questions
  15. 28:112 kinds of Symbols
  16. 28:48Action View template caching
  17. 32:28Part 2 Summary
~/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.