Preface |
The Need for Speed |
How to Read This Book |
Acknowledgments |
1. | What Makes Ruby Code Fast |
What Makes Ruby Code Slow |
Optimize Memory |
Get Into the Performance Mind-set |
2. | Fix Common Performance Problems |
Save Memory |
Optimize Your Iterators |
Write Less Ruby |
Takeaways |
3. | Make Rails Faster |
Make ActiveRecord Faster |
Make ActionView Faster |
Takeaways |
4. | Profile |
Measure with Ruby-Prof |
Visualize with Ruby-Prof Printers |
Visualize with KCachegrind (QCachegrind) |
Takeaways |
5. | Learn to Optimize with the Profiler |
Optimize but Don’t Break |
Pick Low-Hanging Fruit |
Take a Step Back |
Takeaways |
6. | Profile Memory |
Detect Excessive Memory Usage |
Profile Memory with Ruby-Prof |
Measure Memory Yourself with GC#stat and GC::Profiler |
Takeaways |
7. | Measure |
Minimize External Factors |
Make Internals Behave Predictably |
Analyze and Compare Measurements Using Statistics |
Takeaways |
8. | Test Performance |
Benchmark |
Assert Performance |
Report Slowdowns and Optimizations |
Test Rails Application Performance |
Takeaways |
9. | 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 |
10. | 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! |
3.149.249.252