pyramid_debugtoolbar
pyramid_debugtoolbar copied to clipboard
sqla panel - max number of queries
It wouldn't hurt to add a setting to cap the number of queries that the panel actually tracks per request. It's possible someone is doing a loop, adding a bunch of objects, etc, and there can be some significant performance impact (request time and memory usage) to store all of these queries.
I've hit this problem too, as I posted about it on the Pylons Discuss and SQLAlchemy mailing lists. The debug toolbar is very useful in development, but in some circumstances I use command line bootstrapped scripts even for test cases within dev environment (tuned to my dev box database access as opposed to production cluster) when processing "large" amounts of data. And by "large" I mean even few thousand rows with complex relationships brought my 4GB box down to its knees calling for sysreq reboot.
This was / is-being worked on in https://github.com/Themanwithoutaplan/pyramid_debugtoolbar and/or https://github.com/marcofalcioni/pyramid_debugtoolbar
Those two branches haven't moved since March 2012: do we need to jog somebody's memory?
The first repo seems to be the more complete. At least it'll fix the bug by restraining the number of queries it keeps. I'll take a look tonight. If people have opinions about this issue please show yourself!