Let’s review what you just learned about profiling:

  • Use ruby-prof for profiling. Get better profile visualization with KCachegrind/QCachegrind.

  • Profiling is the only reliable way to understand what is slow in your application. Unfortunately it doesn’t tell you how to optimize.

  • Profiling and visualization tools are prone to double counting. You must carefully examine your profile to draw the right conclusions.

  • Remember little details that can make your profiles invalid. Turn off GC for CPU profiling.

Get Ruby Performance Optimization now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.