Last Updated: February 25, 2016
· thusstyles

Rails performance gains using .includes

Use .includes in models for performance gains, for example

@products = Product.includes(:categories)

This will improve performance and is only a small change!

2 Responses
Add your response

Use a gem called bullet It will tell you when to use it and when you are just throwing performance away using it ;)

over 1 year ago · for Just the right amount of Rails eager loading

over 1 year ago ·

Have a fresh tip? Share with Coderwall community!

Post a tip