[Python-Dev] Reduce memory footprint of Python (original) (raw)
Stefan Behnel stefan_ml at behnel.de
Sun Oct 6 18:11:19 CEST 2013
- Previous message: [Python-Dev] Fwd: Reduce memory footprint of Python
- Next message: [Python-Dev] Reduce memory footprint of Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Benjamin Peterson, 06.10.2013 17:41:
2013/10/6 Victor Stinner:
unittest doesn't look to release memory (the TestCase class) after the execution of a test. Is it important to optimize unittests for memory usage?
Maybe "optimise" isn't the best word, but test suites can sometimes be huge and I can't see a reason to keep an old TestClass instance around after all its tests have run. So why not free it? If the tests do any intermediate caching, it's likely to happen at that level (or at the module level, but that's the user's decision).
Sure, if memory matters, there's tearDownClass() for manual cleanup, but why require users to care when we otherwise provide automatic memory management everywhere else? It certainly improves the default setup.
Stefan
- Previous message: [Python-Dev] Fwd: Reduce memory footprint of Python
- Next message: [Python-Dev] Reduce memory footprint of Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]