Kinly’s slowest endpoints: from 20 seconds to under 2
20 s to under 2 s for the slowest requests
Some requests at Kinly took 20 seconds. I found the N+1 queries, one database call per row, tuned the queries and the async I/O, and shipped it behind a pytest suite of 1,400+ tests, with no new errors.