News for hackers. Stuff that matters.
Re:12 requests per second: A realistic look at Python web fr... by grw_ on Friday February 19, 2021 @05:57AM (#26191735)
I encountered this a few times and started adding tests that assert each handler only executes the expected number of queries (and no more). If the application code is modified such that this N+1 query pattern occurs the test will immediately fail and you go optimise the query, problem solved.

https://docs.djangoproject.com/en/dev/topics/testing/tools/#...

Re:12 requests per second: A realistic look at Python web fr... by drunkpotato on Friday February 19, 2021 @04:21PM (#26198191)
Or the person who changed the code then disables the test or sets N to 100,000,000 or something equally pleasurable to debug.