~/talk

From slow to go: Rails test profiling hands-on

Talkat RailsConf 2024 · 2024-05-07..05-09· [ruby-on-rails, testing]
slides:none on file

Workshop shows concrete steps and wins: run a sample of 100 examples with stackprof and verer to find boot and GC hotspots, turn off per-run coverage to cut load time ~15%, disable debugger and enable webpacker caching for another ~10% cut, and flip Sidekiq to fake to drop its share from ~25% to ~2–3% of run time. TestProf features used include TestProf toolbox event profiling, FactoryProf and LetItBe (halving some request specs from ~3.5s to ~1.5s), and an rspec stamp patches workflow that auto-inserts 13 quick fixes.

AI-written summary · about

  1. 0:00Introduction
  2. 1:04Why optimizing Rails tests matters
  3. 8:52Profiling with stackprof and verer
  4. 21:13Analyzing results and bottlenecks
  5. 40:57Disabling coverage reports
  6. 47:44Focusing test groups with testprof
  7. 50:37Profiling sidekick and paperclip
  8. 1:07:05Optimizing sidekick and paperclip
  9. 1:21:49Factory profiling with FactoryProf
  10. 1:31:27Fixing factory cascades
  11. 1:40:08Faster setup with Let It Be
  12. 1:48:03Profiling before/after hooks
  13. 2:01:55Summary
~/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.