nate
2012-Dec-13 16:21 UTC
Should render collection: @items have a cache option so that read_multi can be utilized?
I released a gem yesterday https://github.com/n8/multi_fetch_fragments that adds this syntax on rendering a collection of partials: <%= render partial: ''item'', collection: @items, cache: true %> And then the gem uses Rails read_multi to fetch any cached fragments of this partial. It can be a pretty big speed boost instead of fetching from Memcached sequentially. One guy saw a 93% improvement on an action of his that was simply rendering out 25 items. Some folks have been asking me to post to this list to see if this is something that I should write a pull request for against Rails to become a standard feature? -Nate -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/0pSXwh19V6YJ. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
mateo
2012-Dec-14 18:01 UTC
Re: Should render collection: @items have a cache option so that read_multi can be utilized?
> Some folks have been asking me to post to this list to see if this is > something that I should write a pull request for against Rails to become a > standard feature? >I can''t speak for anyone but myself, but +1 to this -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/fDdt5EHCR_AJ. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.