Ruby Performance Optimization (PragProg)

You don’t have to accept slow Ruby or Rails performance. In this comprehensive guide to Ruby optimization, you’ll discover exactly what makes Ruby and Rails code slow, and how to fix it. You’ll master memory and CPU optimization, profiling, measuring, performance testing, garbage collection, and tuning.

Alexander Dymo @adymo

edited by Michael Swaine @michaelswaine

You don’t have to accept slow Ruby or Rails performance. In this comprehensive guide to Ruby optimization, you’ll discover exactly what makes Ruby and Rails code slow, and how to fix it. You’ll master memory and CPU optimization, profiling, measuring, performance testing, garbage collection, and tuning.

You’ll go from performance rookie to expert. First, you’ll learn the best practices for writing Ruby code that’s easy on the CPU and memory, and that doesn’t trigger the dreaded garbage collector. You’ll discover the bottlenecks in Rails code and learn how selective attribute loading and preloading can mitigate the performance costs of ActiveRecord. You’ll profile your code, make sense of profiler reports, and make optimization decisions based on them. You’ll write performance tests, and you’ll learn the right way to benchmark Rails.

Your code will run orders of magnitude faster.


“A must-have for anyone bringing performance-sensitive Ruby programs to production. It will teach you how to efficiently hunt down and correct the bottlenecks that make users sad and prevent teams from spending time building new functionality.”

–Matt Margolis, director of application development, Getty Images


  • Full details: Search
  • View this book’s portal and details on how to post errata and suggestions here.

Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “devtalk.com" at checkout :+1:

2 Likes