salsify / goldiloader

Just the right amount of Rails eager loading
MIT License
1.61k stars 53 forks source link

Optimize association eager loadable checks #78

Closed jturkel closed 5 years ago

jturkel commented 5 years ago

This PR optimizes association eager loadable checks by caching some information on the association's ActiveRecord::Reflection::AssociationReflection which is shared across instances of a given ActiveRecord model class. It brings the performance of Goldiloader automatic eager loading on par with explicit Active Record eager loading benchmarked in #77.

@fgarces - you're prime /cc @will89