On Fri, Jan 29, 2010 at 8:10 PM, PierreW <[email protected]> wrote:
> 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
>
>
Pierre, you might be interested in the following thread within this mailing
list because it covered a similar topic:
"activerecord 2.3.5's create & find slower than activerecord 2.1.2"
Good luck,
-Conrad
> --
> 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]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
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.