search for: current_review

Displaying 1 result from an estimated 1 matches for "current_review".

Did you mean: current_reviews
2007 Oct 18
0
Very strange - major leak, crashed mongrel
...mage per submission. The view (and partial) code does some very intense things, like @ submission.reviews.each | review | review.image.imageprofile.releases.empty? , etc. No doubt causes huge joins and queries down the stack. I built a query for a subset of the reviews belonging to @submission: @current_reviews = Review.find(:all, :conditions => cond) The query takes 20 milliseconds. [cond is along the lines of finding max(id) where submission_id=@submission.id group by image_id ] Then when I try to loop thru these in view, replacing @ submission.reviews.each with @current_reviews.each , it leaks l...