Takeaways

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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.