SpeedupRails, Speedup Your Code
summary
Shows concrete speed wins: uses Benchmark IPS, stackprof, gc.stat and allocation_tracer to measure Rails internals, builds a bind‑parameter cache for ActiveRecord relations (trading bounded memory for big speedups) and verifies it works. Reports up to ~70% fewer object allocations for post.find vs 4.1 and ~55% vs 2.3, about 100% faster for certain has_many through growth cases, and a 19% string‑allocation cut on a scaffold page. Includes experiments that explain when relation caching is worth the complexity.
AI-written summary · about
chapters (29)
- 0:00Start
- 6:32Map of the World
- 10:34Performance Trade-Offs
- 10:58Time versus Space
- 12:41Performance Tools
- 15:52Standard Deviation
- 17:51Black Box Testing
- 23:26Stackprof
- 26:24Benchmarking Views
- 29:37Allocation Trace
- 30:54Speeding Up Active Record
- 33:17Bind Parameters
- 34:12Code Two Coupling
- 35:53Anonymous Middle Model
- 37:24Cache Object Internals
- 39:27Example Implementation
- 41:25Performance of Active Record
- 46:43Challenges
- 48:19Example Controller
- 52:10Speeding Up Helpers
- 52:31Reduce Object Allocations
- 54:25Tag Options Method
- 54:50Html Sanitization in Rails
- 59:31String Object Reduction
- 1:00:03Mutable Strings
- 1:01:54Speeding Up Output
- 1:02:11The Law of Demeter
- 1:04:38Output Buffer
- 1:07:30Github Was Finally Upgrading to Rails 3 0








