flyerhzm / bullet

help to kill N+1 queries and unused eager loading
MIT License
7.09k stars 435 forks source link

Line numbers? #22

Open firebelly opened 14 years ago

firebelly commented 14 years ago

Is there anyway Bullet could output the line number of the finder that needs to be modified? I've taken over a convoluted app, and am actually having trouble finding the finders Bullet is telling me to modify.

plentz commented 12 years ago

+1, but seems to be a bit complicated to do this, since rails will call the query only when it's needed(and often it only happen in the view)

kgrz commented 10 years ago

Correct me if I'm wrong, but Isn't this feature already present? If you enable the bullet logger, it will log the line number of the view template where the possible N+1 query happens.

jasonfb commented 7 years ago

this is impossible on a technical level AFAIK because Ruby doesn't keep a record (line of code) of where an Arel was first created.