Hi guys,

I must be missing something obvious...

array_of_stuff = [ contains a lot of fairly small AR objects ]

# RAM at 30MB

array_of_stuff.each do |foo|
    foo.save
end
array_of_stuff = nil

# RAM at 60+MB

The iteration itself takes 30+MB of RAM (I measure with "memory_usage
from #{pcaller} at l.#{pline}: "+`ps -o rss= -p #{$$}`.to_i.to_s).

I don't get it. Why is this using so much memory?

Thanks a lot,
Pierre

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to