[Rails] Re: Where does all the memory go?
by Bryan Duxbury other posts by this author
Aug 13 2007 2:54PM messages near this date
[Rails] Re: Where does all the memory go?
|
[Rails] Re: Where does all the memory go?
kevin evans wrote:
> Thanks for the replies.
>
> Bryan, Soory I'm a bit of a ruby newbie (still!!!), do you mean use
> some form of syntax for the Find that returns all images as an array,
> for processing?
>
> also @photo = nil (is that what you mean?
>
> On Aug 13, 10:17 pm, Bryan Duxbury <rails-mailing-l...@[...].net>
In my first suggestion, I'm saying that you should try
Find::find("#{SOURCE_PATH}/#{folder}") do |path|
end
and watch the memory usage of just that alone and see if it's poor. I'm
not familiar with that library personally, so I'd want to verify that
it's not the memory hog.
You have it right on the other one, @photo = nil will make sure that
reference goes away which could lead to quicker garbage collection.
Actually, it looks like @photo should really be a local variable, since
it's lifetime should only be within the Find::find block, so drop the @
from @photo.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Ta
lk" group.
To post to this group, send email to rubyonrails-talk@[...].com
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@[...].com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Thread:
Kevin Evans
Bryan Duxbury
Kevin Evans
Bryan Duxbury
Kevin Evans
Rick Olson
|