~/talk

3x Rails: Tuning the Framework Internals

Talkat RailsConf 2016 · 2016-05-04..05-06· [ruby, web-performance]
slides:none on file

Benchmarks with benchmark-ips, stackprof, rblineprof and TracePoint show GC costing about ten percent, an optimized template resolver that scans and caches view files runs 18× faster, an ERB handler change yields ~1.5× speed and lower memory, and a proof‑of‑concept SQL string builder called Arenai avoids heavy AREL nodes. Parallel partial rendering fails on DB connection limits, model.present triggers 85 method calls, and ActiveSupport time_with_zone measures 25× slower than Time; a single-query schema load makes tests ~600× faster and is landed in Rails 5.

AI-written summary · about

  1. 0:00Introduction
  2. 6:18About this talk
  3. 6:33Measuring the speed
  4. 8:22Ruby GC
  5. 10:52Strings in Rails
  6. 12:46Ruby slow
  7. 13:52Profiling software
  8. 14:45TracePoint
  9. 18:51ActionView
  10. 19:18Template Lookup
  11. 22:19Full Path
  12. 23:08Render Parallel
  13. 25:01Encoding Support
  14. 28:30Memory Consumption
  15. 30:25Safe Buffer
  16. 32:06ActiveRecord
  17. 34:18ModelPresent
  18. 36:04Autoload
  19. 37:03Speeding up tests
  20. 37:54Active support
  21. 39:58Conclusion
~/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.