3 ms·
I found pdb to be useful when I wrote my own code from scratch. I found it useless when using a large app on top of Django. Oh really? I have a lot of dicts and
by IgorPartola 9y ago
I found pdb to be useful when I wrote my own code from scratch. I found it useless when using a large app on top of Django. Oh really? I have a lot of dicts and tuples? Who knew. I would rather see something like a count of object allocated but not released at the end of each request cycle and their reference graph. Because when I have found memory leaks it has had to do with some kind of cyclic dependencies or creating objects that some kind of long lived object like a database adapter wanted to hold onto.
- sametmax 9y agoYou got muppy for that: https://pythonhosted.org/Pympler/muppy.html https://pythonhosted.org/Pympler/muppy.html Also objgraph: https://www.darkcoding.net/software/finding-memory-leaks-in-python-with-objgraph/ https://www.darkcoding.net/software/finding-memory-leaks-in-... If you are lucky to use Python 3.6+, you got tracemalloc: https://docs.python.org/3/library/tracemalloc.html https://docs.python.org/3/library/tracemalloc.html
- IgorPartola 9y agoThanks. Those do look excellent.