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!
Written by Theo Styles
Related protips
2 Responses

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
·

https://github.com/salsify/goldiloader for Just the right amount of Rails eager loading
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#