A slow grid in a Flask app I maintain had an obvious suspect. The biggest cost was Python re-checking 134,000 objects that would never be freed.