Last Updated: February 25, 2016
·
1.928K
· jarrettgreen

Kill N+1 Queries with Bullet Gem

I'm notorious amongst our team for forgetting to eager load. One of the best little gems I've come across to help me remember is Bullet.(https://github.com/flyerhzm/bullet)

It will let you know (via Javascript alerts or, if you prefer, a logger) if it finds an N+1 query, or if it finds you are eager loading if you shouldn't be.

It's quite helpful (and more importantly, hard to ignore) in development. It's loud, and I like it.