This page is a quick guide on tracking down and patching memory leaks and other memory usage issues in Ruby & Rails.
Example: Profiling Harvesters
Memory Profiling Harvesters
require 'memory_profiler' recs = NaraHarvester.new.records report = MemoryProfiler.report { 100.times { recs.next } } report.total_retained