On Sun, 06 Oct 2013 22:27:52 +0200, mar...@v.loewis.de wrote: > > Quoting Benjamin Peterson <benja...@python.org>: > > >> If you know that your application uses a lot of memory, it is > >> interesting to sometimes (when the application is idle) try to release > >> some bytes to not use all the system memory. On embedded devices, > >> memory is expensive and very limited. Each byte is important :-) > > > > How many embedded systems are running Python? > > And of those, how many use the linecache module?
I can give you one data point: a mobile platform that (currently) uses Python3, and does not use linecache because of how much memory it consumes. As far as the other caches go, every MB counts if you don't have swap, even if you have 2GB of RAM. And especially if you don't :) Like Victor, I spent quite a bit of time helping to trim a MB here and a MB there. I would have loved to have had his tools for doing that work! Trimming linecache was one of the early big wins, even though it made some aspects of development harder. We also cleared most of the other caches after startup (of a long running process). --David PS: I have always thought it sad that the ready availability of memory, CPU speed, and disk space tends to result in lazy programs. I understand there is an effort/value tradeoff, and I make those tradeoffs myself all the time...but it still makes me sad. Then, again, in my early programming days I spent a fair amount of time writing and using Forth, and that probably colors my worldview. :) _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com