Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Heh, I'm literally in the middle of optimizing some N+1 query endpoints in a Django application for work, made a bit more tricky because of DRF's serializer.

I think a setting for lazy queries would be a good solution, with it enabled by default to ease the transition. It would be nice to have a couple options, though – allow, warn, and error.

It would also be great to have a way to change the setting on the fly so that, e.g., the Django shell can automatically enable it for those quick debugging sessions.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: