memory-leaks

Efficiency of using a Python list as a queue

Efficiency of using a Python list as a queue Question: A coworker recently wrote a program in which he used a Python list as a queue. In other words, he used .append(x) when needing to insert items and .pop(0) when needing to remove items. I know that Python has collections.deque and I’m trying to figure …

Total answers: 5

How do I find what is using memory in a Python process in a production system?

How do I find what is using memory in a Python process in a production system? Question: My production system occasionally exhibits a memory leak I have not been able to reproduce in a development environment. I’ve used a Python memory profiler (specifically, Heapy) with some success in the development environment, but it can’t help …

Total answers: 7