>> Some questions about disabling GC: >> >> * Memory consuming action - will it kill server? >> >> * Lets assume that one of your libraries used by the action is >> calling >> GC.start explicitly - the library "knows" it consumes a lot of memory >> and tries to free it in the right time - what will happen? > > Hell, for sure those are dangerous situations. But then I guess I > would know about the memory consumption of my app, or measure it in a > high usage scenario. > > I guess this is an issue for all apps, GC running or not: If you are > running some code that needs much RAM all at the same time (so even > the GC kicking in couldn't help) this can already kill your server. > (And I have seen ActiveRecord queries taking up up to somewhere close > to 1 GByte) So you should always know what memory requirements your > app has. And if you are know that and know that you are on the right > side of the tracks, then, I guess, you should be fine. > > In our app we have quite a strict upper limit on how many objects we > have to deal with, so I guess I might feel safe :)
Be careful here... I wrote an app awhile back that used the ultraviolet syntax highlighter. Didn't even occur to me it might chew up a lot of ram and in all my usage it didn't. Until I sent it a couple pages of horribly formatted html and it ballooned into a couple hundred megs. Kind of surprised me. Point being.. just be sure to double check your assumptions about memory usage... everyone knows to take another look at imagemagick, but some others suffer in odd cases as well... Also, as to the Proc enhancement, I haven't thought about it and my head hurts... But what happens if one of the arguments is say Time.now? Will that get evaluated *once* or each time? That is, will you have the same issue you'd have if you wrote: named_scope :foo, :conditions => ["created_at >= ?", 5.days.ago] Where 5.days.ago gets evaulated *once* and never changes until you restart (hence the need to passing a lambda into your namedscope). -philip --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

