jmcarp / nplusone

Auto-detecting the n+1 queries problem in Python
MIT License
1.01k stars 50 forks source link

[WIP] Refactor django eager load listeners. #14

Closed jmcarp closed 8 years ago

jmcarp commented 8 years ago

Currently, eager load listeners only check the associations loaded and ignore the specific objects. That means we can get false positives on empty queries, and touching an eager-loaded attribute can resolve the wrong eager load. This PR refactors eager load checks and expands test cases to handle situations that fail now.