Use first
<%= render partial: 'partial', collection: @collection, as: c %>
but not
<% @collection.each do |c| %> <%= render partial: 'partial', locals: { c: c } %> <% end %>
This is obvious, I donโt know why I didnโt. They brought some improvements, but not a huge amount.
If you use 1.9.3, these environment variables are of great importance, knocking down about 20% of the request:
RUBY_HEAP_MIN_SLOTS=600000 # This is 60(!) times larger than default RUBY_GC_MALLOC_LIMIT=59000000 # This is 7 times larger than default RUBY_HEAP_FREE_MIN=100000 # This is 24 times larger than default
via: http://www.web-l.nl/posts/15-tuning-ruby-s-garbage-collector-with-rvm-and-passenger
source share