Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Slow rendering with multiple nested partials #385

abuzzell opened this Issue Jan 3, 2013 · 2 comments


None yet
2 participants

abuzzell commented Jan 3, 2013

I'm finding that rendering gets very slow in cases where I have nested partials.

We are doing a lot of stuff like this:

node :activities do
"count" => @user.activities.count,
"items" => partial('v1/activity/list', :object => @activities)

Where the list itself calls a partial for each item, and the view those items uses may also call a partial or two.

I've ruled out the DB as the bottleneck, and I don't think it is GC as I've tried tuning Ruby's GC.

It just seems that there is an exponential slowdown as partials are called.

Any suggestion? I love the DRY aspect of partials, but the performance is a problem.


@abuzzell abuzzell closed this Feb 8, 2013

abuzzell commented Feb 8, 2013

Closed: This was a problem elsewhere in the application.


nesquena commented Feb 8, 2013

Great, thanks for updating. You may want to check https://github.com/nesquena/rabl/wiki/Rabl-In-Production for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment