Table of Contents

  • Preface
  • What Makes Ruby Code Fast excerpt
    • What Makes Ruby Code Slow
    • Optimize Memory
    • Get into the Performance Mind-set
  • Fix Common Performance Problems
  • Make Rails Faster
    • Make ActiveRecord Faster
    • Make ActionView Faster
    • Takeaways
  • Profile
    • Measure with Ruby-Prof
    • Visualize with Ruby-Prof Printers
    • Visualize with KCachegrind (QCachegrind)
    • Takeaways
  • Learn to Optimize with the Profiler
    • Optimize but Don’t Break
    • Pick Low-Hanging Fruit
    • Take a Step Back
    • Takeaways
  • Profile Memory
    • Detect Excessive Memory Usage
    • Profile Memory with Ruby-Prof
    • Measure Memory Yourself with GC#stat and GC::Profiler
    • Takeaways
  • Measure
  • Test Performance
    • Benchmark
    • Assert Performance
    • Report Slowdowns and Optimizations
    • Test Rails Application Performance
    • Takeaways
  • Think Outside the Box
    • Cycle Long-Running Instances
    • Fork to Run Heavy Jobs
    • Do Out-of-Band Garbage Collection
    • Tune Your Database
    • Buy Enough Resources for Production
    • Takeaways
  • Tune Up the Garbage Collector
    • Understand How Ruby Uses Memory
    • Know What Triggers GC
    • Understand Why GC in Ruby 2.1 and 2.2 is So Much Faster
    • Tune Up GC Settings
    • Takeaways
    • Onward!