3x Rails: Tuning the Framework Internals
summary
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
chapters (21)
- 0:00Introduction
- 6:18About this talk
- 6:33Measuring the speed
- 8:22Ruby GC
- 10:52Strings in Rails
- 12:46Ruby slow
- 13:52Profiling software
- 14:45TracePoint
- 18:51ActionView
- 19:18Template Lookup
- 22:19Full Path
- 23:08Render Parallel
- 25:01Encoding Support
- 28:30Memory Consumption
- 30:25Safe Buffer
- 32:06ActiveRecord
- 34:18ModelPresent
- 36:04Autoload
- 37:03Speeding up tests
- 37:54Active support
- 39:58Conclusion








