From: Chuck Remes Date: 2012-01-30T04:20:22+09:00 Subject: Re: perf optimization using profile results --Boundary_(ID_pZvABImhkCTYwOIkuCxFHg) Content-type: text/plain; CHARSET=US-ASCII Content-transfer-encoding: 7BIT On Dec 14, 2011, at 7:47 AM, Chuck Remes wrote: > On Dec 14, 2011, at 2:04 AM, Charles Oliver Nutter wrote: > > > Okay, so I should look for lines where I execute "Class.new {}" in my code. Off the top of my head, it is *rare* that I call Class.new directly; it's almost always via an actual class constant name. > >>> I'll take a shot at reducing my object allocation. More information on how many of each type of object is being allocated would be a wonderful statistic to have. Also, if there were a way to trace that allocation back to a particular file and line number (for those cases where the same object is allocated in multiple places), that would be a killer profiling feature. >> >> Indeed it would. Luckily, the JVM already provides it. >> [snip] >> If you find this information useful, perhaps you can reformat it for a >> JRuby wiki page :) > > I find it *very* useful and I *will* add it to the wiki. Thanks for taking the time to post this! It took me a while to get around to it, but I added it to the wiki. Check it out here: https://github.com/jruby/jruby/wiki/Profiling-Object-Allocations cr --Boundary_(ID_pZvABImhkCTYwOIkuCxFHg)--