[Python-Dev] Reduce memory footprint of Python

Antoine Pitrou solipsis at pitrou.net
Sun Oct 6 22:40:28 CEST 2013


On Sun, 06 Oct 2013 22:27:52 +0200
martin at v.loewis.de wrote:
> 
> Quoting Benjamin Peterson <benjamin at 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?

The linecache module is used implicitly by the traceback and warnings
module, so perhaps quite a bit more than one would imagine :-)

I think limiting the linecache cache size would be good enough.

Regards

Antoine.




More information about the Python-Dev mailing list