Forum: Ruby on Rails ruby-prof's memory profiling Vs. my app

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0d8600ea9d02baf8c84503b9410598ac?d=identicon&s=25 Pete Higgins (phiggy)
on 2009-02-04 20:22
I've been using ruby-prof's memory profiling mode to try to reduce the
memory usage of an app, with ruby enterprise edition and rails 2.2.2. I
setup a profiling test (as recommended in the ruby-prof docs) for a
single action, and after my refactoring ruby-prof said I had cut memory
usage by 1/3 and object allocations by 1/2.

After this, I setup a script to hit that action repeatedly with the same
parameters and measure the amount of memory used by the mongrel process,
once for my refactored code and once for point I branched from. This
script tells me that I've actually made the memory usage worse by about
10-20%.

Has anyone run into a discrepancy like this before?
This topic is locked and can not be replied to.