La forma recomendada para acelerar el procesamiento erb es evitar hacerlo. Intente utilizar el almacenamiento en caché de la página o los encabezados GET condicional para evitar la reproducción de contenido que no ha cambiado.
http://guides.rubyonrails.org/caching_with_rails.html
class ProductsController < ApplicationController
def show
@product = Product.find(params[:id])
# If the request is stale according to the given timestamp and etag value
# (i.e. it needs to be processed again) then execute this block
if stale?(:last_modified => @product.updated_at.utc, :etag => @product)
respond_to do |wants|
# ... normal response processing
end
end
# If the request is fresh (i.e. it's not modified) then you don't need to do
# anything. The default render checks for this using the parameters
# used in the previous call to stale? and will automatically send a
# :not_modified. So that's it, you're done.
end