performance

Profile and optimize Ruby code using StackProf, benchmark-ips, and memory_profiler.

3|Updated Jan 9, 2026
One-click install
npx skills add https://github.com/bastos/ruby-plugin-marketplace --skill performance-bastos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance
Source: https://github.com/bastos/ruby-plugin-marketplace/tree/main/plugins/ruby/skills/performance
Command: npx skills add https://github.com/bastos/ruby-plugin-marketplace --skill performance-bastos

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Profiling and optimizing Ruby applications to identify bottlenecks and improve runtime performance.

Core Features & Use Cases

  • Profiling with StackProf: Identify hot paths and object allocations.
  • Benchmarking with benchmark-ips: Compare implementations with statistical significance.
  • Memory profiling with memory_profiler: Analyze allocations and growth.
  • GC tuning guidance: Tune garbage collection settings to reduce pauses and memory pressure.
  • Use Case: When a Rails app slows down under load, profile controllers and background jobs to squash bottlenecks and validate performance gains.

Quick Start

Run a profiler on your Ruby application to identify bottlenecks and verify performance improvements.

Frequently Asked Questions about performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I profile a Ruby application to identify performance bottlenecks?

Profile Ruby applications using StackProf to identify hot paths and object allocations. It targets controllers and background jobs to pinpoint bottlenecks and validate performance gains under load.

What's the best way to benchmark Ruby code changes for statistical significance?

Benchmark Ruby code changes using benchmark-ips to compare implementations with statistical significance. This approach verifies that performance modifications yield measurable runtime improvements.

How does memory_profiler analyze Ruby memory usage and object growth?

Memory_profiler analyzes Ruby memory usage by tracking object allocations and memory growth. It provides detailed reports to help developers identify memory leaks and optimize allocation patterns.

Can I tune Ruby garbage collection settings to reduce memory pauses?

Yes, you can tune Ruby garbage collection settings to reduce GC pauses and memory pressure. This skill provides guidance on adjusting GC parameters to improve application responsiveness.

Do I need profiling to optimize a Rails app slowing down under load?

Yes, profiling is needed to optimize a Rails app slowing down under load. Profiling controllers and background jobs with StackProf identifies the specific hot paths causing latency.

When should I not use StackProf for Ruby performance optimization?

StackProf might not suit Ruby performance optimization when evaluating high-level implementation variations. Use benchmark-ips instead to compare alternate code paths with statistical significance.